1.use latest SSVS, creat a selfhost project it will display a error on browser

    Response Status
Error CodeHttpCompileExceptionMessagec:\Users\Administrator\AppData\Local\Temp\pi4dpge5.0.cs(20): error CS0234: 命名空间“ServiceStack”中不存在类型或命名空间名称“OrmLite”(是否缺少程序集引用?)Stack Trace[Object: 2018/1/5 7:04:31]: [REQUEST: ] System.Web.HttpCompileException (0x80004005): c:\Users\Administrator\AppData\Local\Temp\pi4dpge5.0.cs(20): error CS0234: 命名空间“ServiceStack”中不存在类型或命名空间名称“OrmLite”(是否缺少程序集引用?) 在 ServiceStack.Razor.Managers.RazorPageResolver.CreateRazorPageInstance(IRequest httpReq, IResponse httpRes, Object dto, RazorPage razorPage) 在 ServiceStack.Razor.Managers.RazorPageResolver.ExecuteRazorPage(IRequest httpReq, Stream outputStream, Object model, RazorPage razorPage) 在 ServiceStack.Razor.Managers.RazorPageResolver.ProcessRequestAsync(IRequest httpReq, Object dto, Stream outputStream) 在 ServiceStack.Formats.HtmlFormat.<SerializeToStreamAsync>d__10.MoveNext()Errors

System.Web.HttpCompileException in ServiceStack.Razor.dll

and razor-corefx test project can’t build sucesss ( error with use
“ServiceStack, Version=, Culture=neutral, PublicKeyToken=null” “ServiceStack, Version=, Culture=neutral, PublicKeyToken=02c12cbda47e6587”
at same project
my env is WIN7 X64 VS2017.5.2

If you’re not using OrmLite, you should be able to resolve this issue by removing from your App.Config:

<add namespace="ServiceStack.OrmLite" />

The razor-corefx project runs without issue, I’m not sure where you’re seeing the assembly reference issues since it uses the new MSBuild project format where those references don’t exist. So it’s not clear what issue you’re running into, you can try clearing out your NuGet cache and re-installing them again:

nuget locals all -clear

Are you creating the project with?

$ dotnet-new razor-corefx ProjectName

Upgrading to v5.0.3 on MyGet should also resolve the ServiceStack.OrmLite compilation issue.

I see assembly reference issues in VS Error List

I don’t use npm , clone razor-corefx from github directly

I can’t reproduce this issue, can you try upgrading to v5.0.2?

when I update to v5.0.3 (must reopen vs, it will get many warnings otherwise) ,it still show same error like above, and ServiceStack version in error list alway <---- I upload the project you can download it and change .png to .rar

That upload doesn’t work, just upload the project to GitHub.

OK see

The issue was that the ServiceStack.Kestrel had a dependency on the main ServiceStack NuGet package which installs the .NET Framework version of ServiceStack.dll. I’ve removed the reference to the “ServiceStack” NuGet package so now it will just install the “ServiceStack.Core” NuGet package defined in the test project.

So if you clear your cache:

$ nuget locals all -clear

and delete the /packages folder and install ServiceStack v5.0.3 packages it should without issues.

The project builds but the tests only run when targeting .netcoreapp2.0 because it can’t resolve lib_uv module. Still looking for workarounds.

Managed to track down the issue with the test project which required adding the RuntimeIdentifier in the Test.csproj:


So if you clear your NuGet cache again:

$ nuget locals all -clear

And either clone the project, manually add the RuntimeIdentifier references above or create a new project with:

$ dotnet-new razor-corefx ProjectName

You should now be able to run Kestrel Self Hosting tests with .NET Framework v4.7.

yeah ,it’s OK ,thank you