Closed tmeschter closed 2 years ago
Note that the version of this component currently in VS was built from the dev17.0.x branch, where the version number is hard coded to 17.0 instead of 16.0 in files.swr. Now that we're trying to insert newer builds from the main branch with fixes for 17.2 we're running into failures related to the incorrect file path.
In the "main" branch, our setup authoring (in files.swr) installs a couple of our .props and .targets files to "\MSBuild\Microsoft\NuGet\16.0". This is the wrong path, as other MSBuild files try to import those .props and .targets files from "\MSBuild\Microsoft\NuGet\.0". As a result these files won't be imported, and non-SDK-style projects attempting to use PackageReference-style NuGet will be very broken. Specifically, they won't read the project.assets.json file and so most reference information will be missing.
The fix here is to stop hard-coding the VS major version in file.swr and instead compute the value from a single source.
VersionPrefix
intoMajorVersion
andMinorVersion
properties.MajorVersion
to files.swr by creating aSwrProperty
item of the same name.MajorVersion
property.Now, when we update the major version in Versions.props the setup authoring will be updated as well.