Is there any way to add Service Stack source code to an existing asp.net core project based off the default template?
I am using the provided .pdb files to debug and I can step into a method and select the file but I am unable to get it to hit certain breakpoints such as AutoQueryFeature.Register(). I’d like to be able to just set breakpoints wherever I like in the source so having the full source as part of my solution would be best I think.
I have downloaded source and checked out 5.4. Then in my project I create folder and go to add existing project then select the ServiceStack.sln and it imports all of the projects into the folder.
I run restore but it fails to compile. I have tried manually referencing each service stack project from my default project and just referencing main ServiceStack project but no matter what I do it is always failing to build.
These are the build errors:
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\ServiceStack.WebHost.IntegrationTests\ServiceStack.WebHost.IntegrationTests.csproj(342,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.402\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\ServiceStack.Auth.Tests\ServiceStack.Auth.Tests.csproj(152,3): error MSB4019: The imported project "E:\Projects\ServiceStackSource\WithSourceTest\WithSourceTest\.nuget\NuGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\ServiceStack.RazorHostTests\ServiceStack.RazorHostTests.csproj(206,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.402\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\RazorRockstars.Console.Files\RazorRockstars.Console.Files.csproj(419,3): error MSB4019: The imported project "E:\Projects\ServiceStackSource\WithSourceTest\WithSourceTest\.nuget\NuGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\RazorRockstars.Web\RazorRockstars.Web.csproj(225,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.402\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\ServiceStack.Mvc.Tests\ServiceStack.Mvc.Tests.csproj(92,3): error MSB4019: The imported project "E:\Projects\ServiceStackSource\WithSourceTest\WithSourceTest\.nuget\NuGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\ServiceStack.AuthWeb.Tests\ServiceStack.AuthWeb.Tests.csproj(243,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.402\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
MyServices.cs(5,20): error CS0234: The type or namespace name 'Templates' does not exist in the namespace 'ServiceStack' (are you missing an assembly reference?) [E:\Projects\ServiceStackSource\WithSourceTest\WithSourceTest\WithSourceTest.ServiceInterface\WithSourceTest.ServiceInterface.csproj]
MyServices.cs(18,31): error CS0246: The type or namespace name 'Service' could not be found (are you missing a using directive or an assembly reference?) [E:\Projects\ServiceStackSource\WithSourceTest\WithSourceTest\WithSourceTest.ServiceInterface\WithSourceTest.ServiceInterface.csproj]
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\CheckWeb\CheckWeb.csproj(240,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.402\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\RazorRockstars.Web.Tests\RazorRockstars.Web.Tests.csproj(103,5): error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is E:\Projects\ServiceStackSource\WithSourceTest\WithSourceTest\\.nuget\NuGet.targets.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\CheckMvc\CheckMvc.csproj(240,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.402\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\ServiceStack.OpenApi.Tests\ServiceStack.OpenApi.Tests.csproj(274,3): error MSB4019: The imported project "E:\Projects\ServiceStackSource\WithSourceTest\WithSourceTest\.nuget\NuGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\ServiceStack.WebHost.IntegrationTests\ServiceStack.WebHost.IntegrationTests.csproj(342,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.402\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\ServiceStack.Auth.Tests\ServiceStack.Auth.Tests.csproj(152,3): error MSB4019: The imported project "E:\Projects\ServiceStackSource\WithSourceTest\WithSourceTest\.nuget\NuGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\ServiceStack.RazorHostTests\ServiceStack.RazorHostTests.csproj(206,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.402\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\RazorRockstars.Console.Files\RazorRockstars.Console.Files.csproj(419,3): error MSB4019: The imported project "E:\Projects\ServiceStackSource\WithSourceTest\WithSourceTest\.nuget\NuGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\RazorRockstars.Web\RazorRockstars.Web.csproj(225,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.402\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\ServiceStack.Mvc.Tests\ServiceStack.Mvc.Tests.csproj(92,3): error MSB4019: The imported project "E:\Projects\ServiceStackSource\WithSourceTest\WithSourceTest\.nuget\NuGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\ServiceStack.AuthWeb.Tests\ServiceStack.AuthWeb.Tests.csproj(243,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.402\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
MyServices.cs(5,20): error CS0234: The type or namespace name 'Templates' does not exist in the namespace 'ServiceStack' (are you missing an assembly reference?) [E:\Projects\ServiceStackSource\WithSourceTest\WithSourceTest\WithSourceTest.ServiceInterface\WithSourceTest.ServiceInterface.csproj]
MyServices.cs(18,31): error CS0246: The type or namespace name 'Service' could not be found (are you missing a using directive or an assembly reference?) [E:\Projects\ServiceStackSource\WithSourceTest\WithSourceTest\WithSourceTest.ServiceInterface\WithSourceTest.ServiceInterface.csproj]
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\CheckWeb\CheckWeb.csproj(240,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.402\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\RazorRockstars.Web.Tests\RazorRockstars.Web.Tests.csproj(103,5): error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is E:\Projects\ServiceStackSource\WithSourceTest\WithSourceTest\\.nuget\NuGet.targets.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\CheckMvc\CheckMvc.csproj(240,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.402\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
E:\Projects\ServiceStackSource\WithSourceTest\ServiceStack\tests\ServiceStack.OpenApi.Tests\ServiceStack.OpenApi.Tests.csproj(274,3): error MSB4019: The imported project "E:\Projects\ServiceStackSource\WithSourceTest\WithSourceTest\.nuget\NuGet.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
I know this is outside the realms of normal support but any help you can provide is greatly appreciated.
To reproduce issue you can clone repo and service stack into same folder:
mkdir test
cd test
git clone https://github.com/ServiceStack/ServiceStack
cd ServiceStack
git checkout v5.4
cd ..
git clone https://github.com/GuerrillaCoder/WithSourceTest
cd WithSourceTest
dotnet restore
dotnet build
The weird thing is that when I checked just now the first build actully completed without errors but then I tried to run and the errors appeared and then subsequent build attempts failed. Not really sure what is going on.
I googled the vaious errors and found issues related to .net core not supporting dependency chains and some reported bugs with older version of sdk but nothing that really matched exactly or had solution.
Any ideas?