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

Linux compatibility issues? #298

Closed
Pilvinen opened this issue Aug 9, 2023 · 4 comments
Closed

Linux compatibility issues? #298

Pilvinen opened this issue Aug 9, 2023 · 4 comments
Labels

Comments

@Pilvinen
Copy link

Pilvinen commented Aug 9, 2023

This strange file appears in my project folder, it always has the same name:

image

It looks like some kind of Windows path thing or something? I'm on Ubuntu Linux and there's this:

CSC : warning AD0001: Analyzer 'GitInfo.SponsorLinker' threw an exception of type 'System.UnauthorizedAccessException' with message 'Access to the path '/usr/share/dotnet/sdk/7.0.306/Roslyn/bincore/%TEMP%\1M5Ot' is denied.'.

Now, the problem is that having that "%TEMP%\1M5Ot" folder in my project root is preventing Rider IDE from building and running my project - for some reason.

Build output:

Build with surface heuristics started at 15.11.11

Use build tool: /usr/share/dotnet/sdk/7.0.306/MSBuild.dll

CONSOLE: MSBuild version 17.6.8+c70978d4d for .NET

CONSOLE: Build started 9.8.2023 15.11.11.

CONSOLE: Project "/tmp/JetBrainsPerUserTemp-1000-1/Gexohyj.proj" on node 1 (default targets).

CONSOLE: ControllerTarget:

CONSOLE: Run controller from /home/pilvinen/.local/share/JetBrains/Toolbox/apps/Rider/ch-0/232.8660.212/lib/ReSharperHost/JetBrains.Platform.MsBuildTask.v17.dll

0>------- Started building project: The Ballad of the Lost Bureaucrat

0>Microsoft.Common.CurrentVersion.targets(3312,5): Error MSB3552 : Resource file "**/*.resx" cannot be found.

0>------- Finished building project: The Ballad of the Lost Bureaucrat. Succeeded: False. Errors: 1. Warnings: 0

Build completed in 00:00:00.730

image

I have no idea what any of this is or what it means, but all fingers are pointing at GitInfo.

I'm using GitInfo 3.1.1. So next I noticed there's an update available, 3.1.2. Maybe that fixed my problem? So, I hit the upgrade button, but alas:

All packages and projects are compatible with net7.0.
The node is not parented by this object so it cannot be removed from it., reason: System.ArgumentException: The node is not parented by this object so it cannot be removed from it.
at Microsoft.Build.Shared.ErrorUtilities.ThrowArgument(Exception innerException, String resourceName, Object[] ar ... Context context)
at JetBrains.Platform.MsBuildTask.ProjectModel.TaskEx.<>c__DisplayClass0_02.<SetAndLogErrors>b__0(TReq req) at JetBrains.Rd.Tasks.RdTaskEx.<>c__DisplayClass11_02.b__0(Lifetime _, TReq req)
at JetBrains.Rd.Tasks.RdCall2.<>c__DisplayClass24_0.<OnWireReceived>b__0() JetBrains.Rd.Tasks.RdFault: The node is not parented by this object so it cannot be removed from it., reason: System.ArgumentException: The node is not parented by this object so it cannot be removed from it. at Microsoft.Build.Shared.ErrorUtilities.ThrowArgument(Exception innerException, String resourceName, Object[] args) at Microsoft.Build.Construction.ProjectElementContainer.RemoveChild(ProjectElement child) at Microsoft.Build.Evaluation.ProjectItem.RemoveMetadata(String name) at JetBrains.Platform.MsBuildTask.ProjectModel.Editing.UpdateProjectItemAction.RemoveMetadata(ProjectItem projectItem, String name) at JetBrains.Platform.MsBuildTask.ProjectModel.Editing.UpdateProjectItemAction.<>c__DisplayClass9_0.<ModifyExistingItem>b__1(String name) at JetBrains.Platform.MsBuildTask.ProjectModel.Editing.UpdateProjectItemAction.ProcessMetadata(ProjectItem projectItem, Func3 onSet, Action1 onRemove) at JetBrains.Platform.MsBuildTask.ProjectModel.Editing.UpdateProjectItemAction.ModifyExistingItem(ProjectItem projectItem) at JetBrains.Platform.MsBuildTask.ProjectModel.Editing.UpdateProjectItemAction.Execute() at JetBrains.Platform.MsBuildTask.ProjectModel.ProjectOperations.UpdateItemHandler(RdUpdateItemContext context) at JetBrains.Platform.MsBuildTask.ProjectModel.TaskEx.<>c__DisplayClass0_02.b__0(TReq req)
at JetBrains.Rd.Tasks.RdTaskEx.<>c__DisplayClass11_02.<Set>b__0(Lifetime _, TReq req) at JetBrains.Rd.Tasks.RdCall2.<>c__DisplayClass24_0.b__0()
at JetBrains.Platform.RdFramework.ExternalProcess.ProtocolConnection1.Execute[T](Func1 action)
at JetBrains.Platform.MsBuildHost.ProjectModel.MsBuildProjectModelSession.Operate[T](IUserDataHolder projectHolder, Func2 action) at JetBrains.Platform.MsBuildHost.ProjectModel.MsBuildProjectModelOperations.UpdateItem(MsBuildProjectModelSession session, IUserDataHolder projectHolder, RdProjectItemIdentity identity, String itemType, String unevaluatedInclude, List1 metadata, RdProjectItemOrigin wildcardOrigin, String targetProjectFileName)
at JetBrains.ProjectModel.NuGet.ProjectSystems.RiderNuGetNetCorePackageReferenceProject.UpdatePackageReference(MsBuildProjectModelSession session, RdProjectItem package, PackageReferenceMetadata metadata)
at JetBrains.ProjectModel.NuGet.ProjectSystems.RiderNuGetNetCorePackageReferenceProject.<>c__DisplayClass16_0.b__0(MsBuildProjectModelSession session)
at JetBrains.ProjectModel.ProjectsHost.MsBuild.MsBuildProjectHost.EditProject(IProjectMark projectMark, Action1 action) at JetBrains.ProjectModel.NuGet.ProjectSystems.RiderNuGetNetCorePackageReferenceProject.InstallPackageAsync(String packageId, VersionRange range, INuGetProjectContext nuGetProjectContext, BuildIntegratedInstallationContext installationContext, CancellationToken token) at NuGet.PackageManagement.NuGetPackageManager.ExecuteBuildIntegratedProjectActionsAsync(BuildIntegratedNuGetProject buildIntegratedProject, IEnumerable1 nuGetProjectActions, INuGetProjectContext nuGetProjectContext, CancellationToken token)
at NuGet.PackageManagement.NuGetPackageManager.ExecuteNuGetProjectActionsAsync(NuGetProject nuGetProject, IEnumerable1 nuGetProjectActions, INuGetProjectContext nuGetProjectContext, PackageDownloadContext downloadContext, CancellationToken token) at NuGet.PackageManagement.NuGetPackageManager.InstallPackageAsync(NuGetProject nuGetProject, PackageIdentity packageIdentity, ResolutionContext resolutionContext, INuGetProjectContext nuGetProjectContext, PackageDownloadContext downloadContext, IEnumerable1 primarySources, IEnumerable1 secondarySources, CancellationToken token) at NuGet.PackageManagement.NuGetPackageManager.InstallPackageAsync(NuGetProject nuGetProject, PackageIdentity packageIdentity, ResolutionContext resolutionContext, INuGetProjectContext nuGetProjectContext, IEnumerable1 primarySources, IEnumerable1 secondarySources, CancellationToken token) at JetBrains.ProjectModel.NuGet.Operations.NuGetInstallOperation.<>c__DisplayClass7_0.<<InstallAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at JetBrains.ProjectModel.NuGet.Operations.NuGetInstallOperation.InstallInternal(IProject project, String packageId, String packgeUserStr, NuGetFeedContext feedContext, Int32 nestedLevel, NuGetNotificationMode mode, NuGetOperationReporter reporter, Func3 nativeInstall, NuGetProject givenNuGetProject)

@ Installing GitInfo in The Ballad of the Lost Bureaucrat finished (0,254 sec)
[Notification][Install] Install failed (project: The Ballad of the Lost Bureaucrat, package: GitInfo v3.1.2)
The node is not parented by this object so it cannot be removed from it., reason: System.ArgumentException: The node is not parented by this object so it cannot be removed from it.
at Microsoft.Build.Shared.ErrorUtilities.ThrowArgument(Exception innerException, String resourceName, Object[] ar ... Context context)
at JetBrains.Platform.MsBuildTask.ProjectModel.TaskEx.<>c__DisplayClass0_02.<SetAndLogErrors>b__0(TReq req) at JetBrains.Rd.Tasks.RdTaskEx.<>c__DisplayClass11_02.b__0(Lifetime _, TReq req)
at JetBrains.Rd.Tasks.RdCall`2.<>c__DisplayClass24_0.b__0()

Again, no idea what is going on. I've never had a NuGet package fail on me this hard before.

I don't know what to do short of removing GitInfo from my project.

@Pilvinen Pilvinen added the bug label Aug 9, 2023
@fuglesang
Copy link

This is likely caused by the inclusion of the SponsorLink nuget package. The same was happening for users of Moq: https://github.com/moq/moq/issues/1371

@tygore587
Copy link

Please be aware, that sponsor link will send hashed mail addresses of your git configuration to the authors servers without your consent.

Also see: moq/moq#1372

@Pilvinen
Copy link
Author

Pilvinen commented Aug 9, 2023

I found a workaround to the issue:

    // private static string GetMajorVersion() => ThisAssembly.Git.SemVer.Major;
    // private static string GetMinorVersion() => ThisAssembly.Git.SemVer.Minor;
    // private static string GetPatchVersion() => ThisAssembly.Git.SemVer.Patch;
    // private static string GetCommitVersion() => ThisAssembly.Git.Commit;
    // private static string GetCommitDate() => ThisAssembly.Git.CommitDate;

    private static string GetMajorVersion() => "0";
    private static string GetMinorVersion() => "0";
    private static string GetPatchVersion() => "0";
    private static string GetCommitVersion() => "0";
    private static string GetCommitDate() => "0";

Plus uninstall GitInfo.

But I suppose since GitInfo is MIT licensed forking GitInfo and removing SponsorLink would also work. 🤔

@kzu
Copy link
Member

kzu commented Aug 28, 2023

Sorry for taking so long to reply here. The dependency is gone and the issue should likewise.

@kzu kzu closed this as completed Aug 28, 2023
@devlooped devlooped locked and limited conversation to collaborators Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants