Add File as a Link on Visual Studio - Debug vs Publish

后端 未结 3 1485
伪装坚强ぢ
伪装坚强ぢ 2020-12-15 15:14

Every time I have to link a file into an ASP.NET project as link, there is always something I forget to do, because Visual Studio is way too buggy and annoying with these. T

相关标签:
3条回答
  • 2020-12-15 15:47

    The MSBuild.WebApplication.CopyContentLinkedFiles NuGet might help you. This package adds a MSBuild target which copies all content files added as link to the Web Application folder during the build.

    0 讨论(0)
  • 2020-12-15 15:49

    If the goal is to include content folders (e.g. scripts, images), then you should not manage the individual files. Instead, include these folders in your build and publish files.

    When files need to be added/removed, simply update them in the content folder. This is essentially how we handle Help files since they are not managed by the developers.

    Check out these links:

    Is there a way to automatically include content files into asp.net project file?

    ASP.NET Web Deployment using Visual Studio: Deploying Extra Files

    0 讨论(0)
  • 2020-12-15 15:52

    I think one of best way is make a symbolic link as you want. It will helpful to you to manage file that always must be same.

    0 讨论(0)
提交回复
热议问题