Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify SDK languages support #1804

Merged
merged 11 commits into from
Oct 25, 2018
Merged

Simplify SDK languages support #1804

merged 11 commits into from
Oct 25, 2018

Conversation

plioi
Copy link
Contributor

@plioi plioi commented Oct 18, 2018

Description

The existing Microsoft.NET.Test.Sdk NuGet package conditionally includes a generated empty Main method for C#, F#, and VB projects so that the end user doesn't have to be concerned with that implementation detail.

There were a number of consequences handled by the *.targets file in order to properly deal with the fact that the Main methods were code generated at build time: special care to ensure the code generation happens before the files would be expected, but after their containing folder existed.

If we instead place the entry points on disk within the NuGet package:

  • The timing issue should disappear as the files already exist ahead of build time.
  • The targets file is easier to read as there's far less work to do.
  • There's no longer a need to encode various languages' source code in XML.

Summary of Changes

  1. The entry points each have their own .cs, .fs, and .vb files.
  2. The build script includes them in the NuGet packaging staging folder so that they are visible to the NuSpec.
  3. The NuSpec includes the entry point files beside the .targets file.
  4. Remove elements from the .targets file that served code generation.

… on the code generation in Microsoft.NET.Test.Sdk.targets.
…et package build/* folders right beside the *.targets files that will use them.
…des instead of code generating on each build.
…re is no longer a dependency on the intermediate directory existing.
…ps/targets, so they are visible to the Microsoft.NET.Test.Sdk.nuspec.
@msftclas
Copy link

msftclas commented Oct 18, 2018

CLA assistant check
All CLA requirements met.

…: 3 new code files, each of which is copied into two destination folders within the package, for a new change of +6
@mmitche
Copy link
Member

mmitche commented Oct 24, 2018

@dotnet-bot test this please

@mayankbansal018
Copy link
Contributor

@plioi , can you resolve these conflicts.

@plioi
Copy link
Contributor Author

plioi commented Oct 24, 2018

@mayankbansal018 I've resolved the conflict.

@mayankbansal018 mayankbansal018 merged commit d9a0690 into microsoft:master Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants