You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently trying to build an ASP.NET Core application that will be hosted inside a Windows Forms application. I'm trying to split the business logic from the host because I want to also have the freedom of changing the host in the future.
However, it seems creating Project references does not work between the new project format and the old one. The types created inside the ClassLibrary (new project style) are not visible inside the old project format.
Steps to reproduce
Create empty solution in Visual Studio 2015 Update 3.
Create a project of type Class Library (.NET Core) named ClassLibrary1.
Go in the project.json and modify it to make it look like below.
Create a project of type Console Application (not .NET Core) named ConsoleApplication1.
Right-click in References under ConsoleApplication1 and add ClassLibrary1 as a Project reference.
Refer to a type that exists in ClassLibrary1.
Build the solution.
Expected behavior
The types inside the ClassLibrary1 project should be recongnized and available to the classic Console application. The solution should build correctly and should output the correct files.
Actual behavior
This will lead the a Build failure in the ConsoleApplication1 project with the code error CS0246: The type or namespace name 'ClassLibrary1' could not be found (are you missing a using directive or an assembly reference?). If instead of adding the reference as a Project reference I go and browse to the bin folder and refer the dll directly, everything builds without an issue. However, this is not a solution since the Build target may change, so the path will change as well.
I'm currently trying to build an ASP.NET Core application that will be hosted inside a Windows Forms application. I'm trying to split the business logic from the host because I want to also have the freedom of changing the host in the future.
However, it seems creating Project references does not work between the new project format and the old one. The types created inside the ClassLibrary (new project style) are not visible inside the old project format.
Steps to reproduce
Expected behavior
The types inside the ClassLibrary1 project should be recongnized and available to the classic Console application. The solution should build correctly and should output the correct files.
Actual behavior
This will lead the a Build failure in the ConsoleApplication1 project with the code error CS0246: The type or namespace name 'ClassLibrary1' could not be found (are you missing a using directive or an assembly reference?). If instead of adding the reference as a Project reference I go and browse to the bin folder and refer the dll directly, everything builds without an issue. However, this is not a solution since the Build target may change, so the path will change as well.
Environment data
dotnet --info
output:.NET Command Line Tools (1.0.0-preview2-003121)
Product Information:
Version: 1.0.0-preview2-003121
Commit SHA-1 hash: 1e9d529
Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64
The text was updated successfully, but these errors were encountered: