-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Update most Batch projects to VS17 #3130
Conversation
@azuresdkci test this please |
e171dd0
to
8032437
Compare
@itowlson @darylmsft @xingwu1 -- Feel free to review this if you want. It's just fixing what we already had though (mostly) so not sure it's worth combing through too much. |
|
||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' "> | ||
<!-- Portable is defined for legacy reasons, if updating AutoRest removes it from BatchErrorException we can remove it here --> | ||
<DefineConstants>$(DefineConstants);netstandard14;PORTABLE</DefineConstants> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthchr portable is no longer a library type we support, so adding a constant that says this code is Portable is misleading.
Rather either your code targets full desktop for that we have used the constant as FullNetFx (so the idea is this can be any version .NET 4.5.2 or .NET 4.6 or !FullNetFx (which is essentially .NET Core/.NET Standard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that we used an older version of AutoRest (just before it switched to the npm distribution model) to generate our code and in the generated code it includes this (PORTABLE). I agree that it's confusing but until we update to use a new AutoRest and regenerate we need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthchr ok sounds good, would be great to either have a item that is being tracked as to when do you plan to do this work and add it to this PR.
We had put work in AutoRest and SDKs to remove such compiler constants, so I would like this constant to go away from the repo.
|
||
<PropertyGroup> | ||
<TargetFrameworks>net452;netstandard1.4</TargetFrameworks> | ||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthchr any reason you need all these properties, which are already defined for the entire repo?
Any reason you are adding all this properties inside the .csproj?
This just makes this entire project file not to use the common properties that are set up for the entire repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is "All these properties"? The only things included in AzSdk.Reference.props
are signing and the client runtime references. I've removed the signing stuff I had here, but that's only 3 lines, the rest we still need right...?
|
||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' "> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
twice declaring for .net standard 1.4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Update="CollectionConversionSnippet.cs"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't project system picking your files without you explicitly adding them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we need these entries because these are cs files genereated from T4 text templates. I didn't add this to this file manually, VS did when I added the T4 text template files (.tt), so i assume that VS needs it (probably for the DesignTime
, AutoGen
, and DependentUpon
annotations
<configuration> | ||
<runtime> | ||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<!--<dependentAssembly> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you still need this file after commenting the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch -- deleted
@@ -0,0 +1,57 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<!--<Import Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.test.reference.props'))" />--> | |||
<PropertyGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Matthch you do not need to add all these properties in the project file? Any reason you are adding all these properties?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied almost all of this from test.props
-- so if I don't need it no other test project needs it too.
I didn't want to use test.props
because it includes DisableTestRunParallel.cs
which since these tests are all in-memory unit tests is pointless.
If you want, you can update test.props
to have a flavor that doesn't have DisableTestRunParallel.cs
and I can use that. Although I am not sure why we are bothering to sign our tests either.
- After the move to VS2017 it's no longer needed.
- FileStaging, FileConventions, ConfigureAwaitAnalyzer, OM code generation tools, and the OM integration tests
8032437
to
815e272
Compare
|
||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' "> | ||
<!-- Portable is defined for legacy reasons, if updating AutoRest removes it from BatchErrorException we can remove it here --> | ||
<DefineConstants>$(DefineConstants);netstandard14;PORTABLE</DefineConstants> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthchr ok sounds good, would be great to either have a item that is being tracked as to when do you plan to do this work and add it to this PR.
We had put work in AutoRest and SDKs to remove such compiler constants, so I would like this constant to go away from the repo.
@@ -60,6 +61,8 @@ | |||
<ProjectToBuild Include="$(MSBuildThisFileDirectory)Automation\**\*Tests.csproj" ProjectType="Test"/> | |||
|
|||
<ProjectToBuild Include="$(MSBuildThisFileDirectory)Batch\Management\**\*Tests.csproj" ProjectType="Test"/> | |||
<ProjectToBuild Include="$(MSBuildThisFileDirectory)Batch\DataPlane\Client\Tools\ObjectModelCodeGeneration\ObjectModelCodeGenerator\ObjectModelCodeGenerator.csproj" ProjectType="Test"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthchr we have moved away from the declarative model, so these projects will not make it part of the build system.
Right now we have deliberately made it sure that we build limited target framework projects, we are not honoring random target frameworks for projects to have consistency across our SDK (what we talked earlier)
We can still do it but I would like to avoid as much special casing as possible.
Let's talk separately and we can find a solution for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, lets chat.
For right now I've disabled all the projects that don't work in Directory.Build.props
, but I would like to get them enabled again. Let's chat today about what we can do.
@shahabhijeet For the issue of Given that this property is in generated code (and even the newest AutoRest isn't using the same one the build is) I think we should punt on this for now. I can and will fix it, but you should coordinate with AutoRest about what this flag should be called (for what it's worth I like your |
@matthchr if AutoRest is using something called "Legacy", I need to know about it as to what "Legacy" mean here. It is even more confusing than portable :) |
@matthchr can you link the new issue to undo the legacy compiler constant once AutoRest fixes it on their end.
For now these special casing projects will not be part of the build system, but will remain in the repo. |
looks good. |
@shahabhijeet Feel free to merge when you're ready. |
Description
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
Testing Guidelines
SDK Generation Guidelines
project.json
andAssemblyInfo.cs
files have been updated with the new version of the SDK.