mob-sakai / CSharpCompilerSettingsForUnity

Change the C# compiler (csc) used on your Unity project, as you like!
MIT License
289 stars 22 forks source link

Generated local package csproj does not get updated #4

Closed KuraiAndras closed 4 years ago

KuraiAndras commented 4 years ago

Describe the bug When adding a UPM package locally, and then generating a csproj for it through unity, de generated project for the upm package does not get updated when generating.

To Reproduce Steps to reproduce the behavior:

  1. Clone https://github.com/KuraiAndras/CCFUBugSample
  2. Open Unity
  3. In Preferences -> External Tools -> External Script Editor select Visual Studio 2019
  4. In the same settings enable Local packages generation
  5. Regenerate project files
  6. Open the project in Visual Studio

Unity does not report any compile errors(correctly), while Visual Studio shows an error in CCFUBugSample.SampleService.TestSwitch. This is because in the unity generated CCFUBugSample.csproj the LangVersion property is set to 7.3 instead of 8.

Expected behavior Any generated csproj gets the desired LangVersion property value

Environment (please complete the following information):

Additional context If this would cause problems for some users, maybe consider making this behavior optional through settings

mob-sakai commented 4 years ago

@KuraiAndras Thank you for the reporting!

mob-sakai commented 4 years ago

@KuraiAndras Fixed in 1.1.1-preview.3. Please try it!

KuraiAndras commented 4 years ago

Yupp this works now! Thank you