Martin
Martin

Reputation: 40583

ASP.NET 5 and Build Action

I have a Web Site and Class Library built with ASP.NET 5. The Class Library depends on an set of external files (XML, EXEs, etc.). Those dependencies are added as part of the project and visible in the Solution Explorer of Visual Studio.

My Web Site has a dependency on the Class Library. When I build the Web Site, I would expect the dependencies of the Class Library to be copied to the Web Site, but they aren't.

The Build Action (Copy always, Copy if changed) appears to be gone with ASP.NET 5. How do I make sure that dependencies other then the DLL of the Class Library itself gets copied to the Web Site project?

Upvotes: 2

Views: 365

Answers (2)

Maxime Rouiller
Maxime Rouiller

Reputation: 13699

First thing first, they won't be in src/yourProject/bin/Debug. Those have been moved to the artifacts folder.

Also, your project by default will not output DLLs. This is mainly due to performance reason but if you need your DLL to publish your application, check your project properties. In the Build section you should have an option called Produce outputs on build. Tick that and bingo.

You have your dlls. Most of the time (aka: while coding), you won't need them since they will always be recompiled in memory.

Upvotes: 2

Victor Hurdugaci
Victor Hurdugaci

Reputation: 28425

You need to manually add a pre/post build step in project.json

Upvotes: 0

Related Questions