Scenario
I am experimenting with Visual Studio 2015 RC, especially looking at the transition to the new ASP.NET 5 framework, the project framework and the new DNX that runs ASP.NET 5 applications.
My employer has many existing solutions focused on the .NET Framework 4.5.2. In our existing Visual Studio solutions, we can have the following projects:
[Solution] Sample.sln [Folder] src [Project] ClassLibrary.csproj [Project] WindowsService.csproj [Project] WebApplication.csproj [Folder] test [Project] ClassLibrary.UnitTests.csproj ...
In this case, ClassLibrary.csproj is a C # class library containing common code. This is the / dependency referenced by both WindowsService.csproj and WebApplication.csproj .
We are not specifically trying to configure .NET Core, dnxcore50 . At this point, we are happy to focus on the .NET Framework, dnx451 . However, we are absolutely trying to use the new features of ASP.NET 5 and the corresponding project structure.
Below are some options that I was thinking about, but both have problems.
Option 1
When we replace the WebApplication.csproj project WebApplication.csproj new ASP.NET 5 DNX WebApplication-dnx project above, we can still refer to ClassLibrary.csproj both from this new DNX project and from the existing WindowsService.csproj project. However, there are some problems:
This approach means that any code changes in ClassLibrary.csproj require that the rebuild be visible at the start of WebApplication-dnx . This is not surprising, but we do not get the full benefit of compiling from source for WebApplication-dnx .
We cannot easily target other frameworks, for example. dnxcore50 . As above, at this stage this is not a specific goal.
Option 2
If we replace ClassLibrary.csproj with the DNX ^ ClassLibrary-dnx class library project, then the problems in option 1 do not apply. It would seem that this approach will be more consistent with how the .NET runtime and related technologies, such as ASP.NET, will be executed in the future.
However, I cannot find a way to reference ClassLibrary-dnx to WindowsService.csproj . If this approach is viable, I believe that the solution has something to do with the project level option for Produce outputs on build , and then refers to .nupkg or possibly even the .dll that is created during build. However, I do not see a clean way to achieve this with the tool.
^ DNX class library projects are called Class Library (Package) in VS 2015 RC. This type of project was previously called the ASP.NET Class Library in CTP.
Summary
Based on the above information, I am looking for:
Some feedback on my scripts and issues.
Suggestions for other parameters that I did not think about.
It may indicate which approach should be used to move forward.