Closed ngohungphuc closed 4 years ago
cc @eerhardt
In my web api project I have to add to fix it
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<PreserveCompilationContext>false</PreserveCompilationContext>
<EnableDefaultContentItems>false</EnableDefaultContentItems>
<OutputType>WinExe</OutputType>
<ApplicationIcon />
<StartupObject />
</PropertyGroup>
@ngohungphuc this should be fixed in the 2.0.3 release of the runtime (November 2017); this doesn't require setting PreserveCompilationContext=false
What version of the runtime do you have?
@steveharter my dotnet version is 2.1.4
Are you trying to add a new reference resolver or just use the existing one?
which reference resolver you want to mention @steveharter
I'm not sure if you are trying to add a new file-reference resolver (note we also have other "resolvers" including package resolvers and project resolvers) or if you are simply trying to use the existing file reference resolver and are having issues with that.
@ngohungphuc - @pakrym's solution (I think you mean @pranavkm) is no longer necessary with ASP.NET Core 2.0.3
or greater. Can you successfully run your app without that code?
@eerhardt I cant
This should be investigated for 2.1.
<PreserveCompilationContext>false</PreserveCompilationContext>
That might be the cause of the issue. Try setting it to true
@ngohungphuc - I pulled the master branch of https://github.com/Awesome-CMS-Core/Awesome-CMS-Core/, and the app seemed to run I think. I got a 404 not found when hitting the home page. But I didn't get the error you describe.
Can you give me a solid set of repro steps to investigate this issue? Assume that I know nothing about your project, and how to set it up to run. It would be best if you could make a branch or something that all I needed to do was pull the branch, hit F5, and I see the exception.
Closing for now, until we get a solid set of repro steps to repro the issue.
I have tried @pakrym solution in my project
ReferenceFeatureProvider.cs
and in this
I will get this error InvalidOperationException: Cannot find compilation library location for package 'AwesomeCMSCore.Modules.API'.
Is there anyway to work around this