Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

PreserveCompilationContext in old style csproj #2146

Closed
CurlyFire opened this issue Mar 9, 2018 · 4 comments
Closed

PreserveCompilationContext in old style csproj #2146

CurlyFire opened this issue Mar 9, 2018 · 4 comments
Assignees
Labels

Comments

@CurlyFire
Copy link

CurlyFire commented Mar 9, 2018

I'm trying to copy the refs folder of my webapplication into the output folder of my test project. The webapplication is netcore20 and my test project is an old school csproj targeting full 4.7 (has to be for specflow to work).

I was able to make it work with a newstyle csproj targeting net47 with this instruction in the csproj. The refs folder was copied into my output folder.

  <PropertyGroup>
    <PreserveCompilationContext>true</PreserveCompilationContext>
  </PropertyGroup>

However, in the old style csproj, the refs folder is not copied and I'm left with precompilation errors when I run my tests. Can I get some guidance ? I think PreserveCompilationContext is from dotnet core.. Maybe there's an equivalent in 4.7 ?

I replicated the two scenarios in this repo:
https://github.com/CurlyFire/InProcKestrel

Thank you very much!

@mkArtakMSFT
Copy link
Member

@ajaybhargavb, can you please look into this? Thanks!

@rynowak
Copy link
Member

rynowak commented Mar 9, 2018

PreserveCompilationContext is part of the .NET SDK. If you project is an old style csproj then there's no way to do this.

@mkArtakMSFT
Copy link
Member

Thanks @rynowak!

@CurlyFire
Copy link
Author

Thanks @rynowak

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants