Question

As far as I know 'DeploymentPath' attribute from the *.csproj file is now obsolete, so what is the best way to add a file to the Web project like ASP.NET MVC? Would a Post-Build step be sufficient? I would like to hear the opinion of the community on this.

Was it helpful?

Solution

Actually the attribute is not gone ... its still supported if its set. As you'll see in the ScriptSharp.targets file, it still uses the property if its set. Whats gone is the UI to set it up at project creation time.

Have a better solution, but that requires a more full-fledged vs extension, so its not ready right now.

For demos what I've been doing is simply changing the output path of the c# project to point to the Scripts directory of the web project you want to deploy to. The downside to this is the .dll file also gets copied there, which may or may not matter in your case.

Of course, a post-build step works just as well ... basically anything you can do with msbuild. Along those lines, as a last resort, the source code to the msbuild tasks is all in the github repository - you can tweak it, or even create a very specific task that works in your workflow.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top