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

Visual Studio 2022 support #1407

Merged
merged 1 commit into from
Feb 2, 2022
Merged

Visual Studio 2022 support #1407

merged 1 commit into from
Feb 2, 2022

Conversation

alexander-renev
Copy link
Contributor

Added support for visual studio 2022

Copy link
Member

@siprbaum siprbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it is doing the mechanical work to add VS2022 support, but from what I can tell,
there are still quite some pices missing.

Could it be that you have VS2019 and VS2022 installed and are therefore using a mixture of libraries?

src/GitTfs.Vs2022/Properties/AssemblyInfo.cs Outdated Show resolved Hide resolved
src/GitTfs.Vs2022/GitTfs.Vs2022.csproj Outdated Show resolved Hide resolved
src/GitTfs.Vs2022/paket.references Outdated Show resolved Hide resolved
Copy link
Member

@siprbaum siprbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor whitespace errors in the csproj, found by diffing the files src\GitTfs.Vs2019\GitTfs.Vs2019.csproj src\GitTfs.Vs2019\GitTfs.Vs2022.csproj
and due to the strange indent in GitHub.

I think I fixed them all up with a suggestion, but please double check.

Please also add an entry to the release notes in this file here:
https://github.com/git-tfs/git-tfs/blob/master/doc/release-notes/NEXT.md mentioning this feature.

<Compile Include="..\CommonAssemblyInfo.cs">
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
<Compile Include="..\GitTfs.VsCommon\ParentForm.cs">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Compile Include="..\GitTfs.VsCommon\ParentForm.cs">
<Compile Include="..\GitTfs.VsCommon\ParentForm.cs">

<Link>ParentForm.cs</Link>
<SubType>Form</SubType>
</Compile>
<Compile Include="..\GitTfs.VsCommon\Retry.cs">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Compile Include="..\GitTfs.VsCommon\Retry.cs">
<Compile Include="..\GitTfs.VsCommon\Retry.cs">

<Compile Include="..\GitTfs.VsCommon\Retry.cs">
<Link>Retry.cs</Link>
</Compile>
<Compile Include="..\GitTfs.VsCommon\TfsHelper.Common.cs">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Compile Include="..\GitTfs.VsCommon\TfsHelper.Common.cs">
<Compile Include="..\GitTfs.VsCommon\TfsHelper.Common.cs">

<Compile Include="..\GitTfs.VsCommon\TfsHelper.Common.cs">
<Link>TfsHelper.Common.cs</Link>
</Compile>
<Compile Include="..\GitTfs.VsCommon\TfsHelper.VS2017Base.cs">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Compile Include="..\GitTfs.VsCommon\TfsHelper.VS2017Base.cs">
<Compile Include="..\GitTfs.VsCommon\TfsHelper.VS2017Base.cs">

<Compile Include="..\GitTfs.VsCommon\TfsPlugin.cs">
<Link>TfsPlugin.cs</Link>
</Compile>
<Compile Include="..\GitTfs.VsCommon\Wrappers.cs">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Compile Include="..\GitTfs.VsCommon\Wrappers.cs">
<Compile Include="..\GitTfs.VsCommon\Wrappers.cs">

@siprbaum
Copy link
Member

Furthermore, it would be nice if you can say a little bit more on what you have tested with VS2022 support. I just did run a quick test and I could successfully imoprt stuff YEAY, but I run into an error after the running
enable_checkin_policies_support.bat, as then a different code path is used and due to a pre-existing error not caused by you an exception is raised if no checkin policies where enabled due to trying to access a registry key which doesn't exist

var propNames = store.GetPropertyNames(@"ExtensionManager\EnabledExtensions");

I didn't notice this before, as I always have checkin policies activated, but for the just installed VS2022 I don't have any. Will open a PR with a fix seperately for that.

@siprbaum
Copy link
Member

siprbaum commented Feb 1, 2022

Sorry for not publishing the fix, I was blocked by an issue in Git itself git-for-windows/git#3674
which took all my OSS time away.

@alexander-renev
Copy link
Contributor Author

@siprbaum Fixed tabs in project file. Added item in release notes.
Personally I've been using this version for several days, everything seems to be working fine. I have only VS 2022 Community installed. fetch/rcheckin/checkintool all seem to work fine.

@siprbaum siprbaum merged commit 01b4837 into git-tfs:master Feb 2, 2022
@siprbaum
Copy link
Member

siprbaum commented Feb 2, 2022

@alexander-renev Thx for you contribution. The changes look fine to me. -> Merged!

@siprbaum
Copy link
Member

siprbaum commented Feb 2, 2022

For reference, PR #1408 contains the fix for the pre-existing problem with enabled checkin policy support

siprbaum added a commit to siprbaum/git-tfs that referenced this pull request Feb 3, 2022
Since ea2b488 ("Visual Studio 2022 support", 2022-01-29) `paket  restore`
shows the following error message in red:

    target: AppVeyorBuild
    Preparing to run build script...
    paket.exe : Could not detect any platforms from 'net6.0' in System.Reflection.Metadata 6.0, please tell the package authors
    At line:1 char:1
    + &"C:\gittfs\src\paket.exe" restore
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (Could not detec...package authors:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError

    Could not detect any platforms from 'net6.0' in System.Collections.Immutable 6.0, please tell the package authors
    Could not detect any platforms from 'net6.0' in System.ComponentModel.Composition 6.0, please tell the package authors
    Could not detect any platforms from 'net6.0' in System.Runtime.CompilerServices.Unsafe 6.0, please tell the package authors
    Could not detect any platforms from 'net6.0' in System.Security.AccessControl 6.0, please tell the package authors
    Could not detect any platforms from 'net6.0' in System.Diagnostics.DiagnosticSource 6.0, please tell the package authors
    Could not detect any platforms from 'net6.0' in System.IO.Pipelines 6.0.1, please tell the package authors
    Could not detect any platforms from 'net6.0' in System.Threading.AccessControl 6.0, please tell the package authors

The build seems still to be successful, as all the tests succeeded and
that is also the reason why this wasn't noticed during PR git-tfs#1407.
But the large wall of text - colored in red - looks frightening.

Update paket to version 6.2.1 to fix it.
Admitingly, I couldn't find out the underlying reason why this is fixed
with a newer version of paket.
siprbaum added a commit that referenced this pull request Feb 3, 2022
Since ea2b488 ("Visual Studio 2022 support", 2022-01-29) `paket  restore`
shows the following error message in red:

    target: AppVeyorBuild
    Preparing to run build script...
    paket.exe : Could not detect any platforms from 'net6.0' in System.Reflection.Metadata 6.0, please tell the package authors
    At line:1 char:1
    + &"C:\gittfs\src\paket.exe" restore
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (Could not detec...package authors:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError

    Could not detect any platforms from 'net6.0' in System.Collections.Immutable 6.0, please tell the package authors
    Could not detect any platforms from 'net6.0' in System.ComponentModel.Composition 6.0, please tell the package authors
    Could not detect any platforms from 'net6.0' in System.Runtime.CompilerServices.Unsafe 6.0, please tell the package authors
    Could not detect any platforms from 'net6.0' in System.Security.AccessControl 6.0, please tell the package authors
    Could not detect any platforms from 'net6.0' in System.Diagnostics.DiagnosticSource 6.0, please tell the package authors
    Could not detect any platforms from 'net6.0' in System.IO.Pipelines 6.0.1, please tell the package authors
    Could not detect any platforms from 'net6.0' in System.Threading.AccessControl 6.0, please tell the package authors

The build seems still to be successful, as all the tests succeeded and
that is also the reason why this wasn't noticed during PR #1407.
But the large wall of text - colored in red - looks frightening.

Update paket to version 6.2.1 to fix it.
Admitingly, I couldn't find out the underlying reason why this is fixed
with a newer version of paket.
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.

None yet

3 participants