NetStandard in Fire requires superuser

(ndelic) #1

If I create a new NetStandard class library, at first everything works ok. After a few restarts of the IDE and a few recompiles of my project, I start getting this:

It only goes away if I start Fire via terminal as sudo. Just to check if maybe something was wrong with my project, I tried to compile swift base library from RO Github and the same thing happened, I could only compile as sudo. Only, this time it was a bit more specific, as the compiler complained that it can’t access some runtime.debian packages. When I looked into the folder(s) I saw that my user name doesn’t have any permissions on runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl.nuspec. Could that have something to do with it? That’s not the only folder that can’t be accessed, there are more.

0 Likes

(ndelic) #2

Update:

The problem went away when I made my user name owner of the Nuget folder and its subfolders.

Update 2:

Change of Nuget ownership actually didn’t help for long. The problem started again after a few restarts of Fire and a few project rebuilds. Only now the Nuget folder ownership solution didn’t work. Oddly enough, unlike my project, Swift Base Library for NetStandard compiles fine.

0 Likes

(marc hoffman) #3

Two questions:

Whats the exact folder that your user doesn/t have permission to access?

~/.nuget/
~/Library Application Support/Remobjects Software/EBuild/Packages/…?

In the latter case this could be a known issue with broken packages; I have encountered that with the Carter package; the zip file has wring permissions, so when we extract it, the resulting files are only readable by admin.

If thats the case, foruntately there’s a workaround, as the error occurs only when Fire downloads/extracts the package when it resolved the references in the IDE (because that is native Cocoa code, and calls unzip), but not when. EBuild does it during the build (coz that’s .NET/Mono code and we have a custom unzip there.

The workaround is: Open you project, wait till it is dine resolving references (check the “References” node). When it’s done, delete the EBuild Packages cache folder (or the specific subfolder for runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl, if thats the only one with problems). With the same instance of Fire still open, now build your project — EBuild will redownload the missing package, and unzip it itself, rights should be fine from now on.

We’ll need to look for a native unzip solution for Fire so that we can “fix” the rights from broken zip files (which unzip doesnt have an option for).

If this is not the issue you’re seeing, let me know…

—marc

0 Likes

(ndelic) #4

As far as I could tell and I checked the entire /EBuild/Packages tree, I have permissions on all folders and files except for .nuspec files shown on second screenshot of my initial message.

I’ll try the suggested workaround.

Update:

Tried your workaround, so far so good.

1 Like

(marc hoffman) #5

Good, it is the same bug, then. We’r looking for an alternative solution to unzip these broken packages w/o the rights getting messed up…

0 Likes