including-generated-files
نگهدارنده dotnet
مهارت targetهای MSBuild را اصلاح میکند تا فایلهای تولیدشده در build در compilation و output قرار گیرند. جزئیات اجرایی، شرایط استفاده و محدودیتهای آن در متن مرجع زیر حفظ شده است. متن مرجع: Fix MSBuild targets that generate files during the build but those files are missing from compilation or output. USE FOR: generat
- نسخه فعلی
- نامشخص
- مجوز
- MIT
- دسترسی شبکه
- نامشخص / ارزیابینشده
- وضعیت بررسی
- تأیید نشده
چه مسئلهای را حل میکند؟
مسئلهٔ targetهای MSBuild را اصلاح میکند تا فایلهای تولیدشده در build در compilation و output قرار گیرند. جزئیات اجرایی، شرایط استفاده و محدودیتهای آن در متن مرجع زیر حفظ شده است. متن مرجع: Fix MSBuild targets that generate files during the build but those files are missing from compilation or output. USE FOR: generated source files not compiling (CS0246 for a type that should exist), custom build tasks that create files but they are invisible to subsequent targets, globs not capturing build-generated files because they expand at evaluation time before execution creates them, ensuring generated files are cleaned by the Clean target. Covers correct BeforeTargets timing (CoreCompile, BeforeBuild, AssignTargetPaths), adding to Compile/FileWrites item groups, using $(IntermediateOutputPath) instead of hardcoded obj/ paths. DO NOT USE FOR: C# source generators that already work via the Roslyn pipeline, T4 design-time generation that runs in Visual Studio, non-MSBuild build systems را با قابلیتهای تصریحشده در منبع حل میکند.
چه زمانی مناسب است؟
وقتی targetهای MSBuild در build فایل میسازند اما فایل در compilation یا output نیست، از این مهارت استفاده کنید: خطای CS0246، task سفارشیِ نامرئی برای target بعدی، glob با زمان expand نادرست یا نیاز به Clean target. برای تنظیم BeforeTargets در CoreCompile، BeforeBuild یا AssignTargetPaths و Compile/FileWrites و $(IntermediateOutputPath) نیز مناسب است؛ برای C# source generatorهای Roslyn، T4 design-time در Visual Studio و build system غیر-MSBuild استفاده نشود.
نصب و بهروزرسانی
این دستورها فقط برای کپی نمایش داده میشوند و روی سرور RefHub اجرا نمیشوند. پیش از اجرا، منبع بالادستی پیوندشده را بررسی کنید.
npx skills add dotnet/skills --skill including-generated-files -y
سازگاری با ایجنتها
هنوز تست سازگاری ثبت نشده است
تا وقتی شواهد تست ثبت نشده، سازگاری این مهارت با ایجنتها را تأییدشده فرض نکنید.