I'm running Visual Studio 2019 through Parallels on a Mac and my solution is not finding any references. I can browse to the location of the references on the Windows' C drive so I know they're there. But in the properties window of the project in VS, they all show as "The system cannot find the reference specified"
What's really weird is I can remove the reference, click "Add", browse to the DLL, select it, add it back to the project successfully, but it still shows as "The system cannot find the reference specified".
I tried the "update Nuget" tool which also just sort of hangs and doesn't do anything.
This has to be some sort of config issue with Parallels, but I'm not finding much info on how to resolve.
I manually copied the "packages" folder from the same solution on a real Windows10 machine into the "packages" folder on the Parallels/Windows10 and now everything seems to work.
What I don't get is that some of the references that were not being found are not even in that "packages" folder (!)
Yet doing that made VS see all the missing refs.
Related
Is anyone able to offer me some advice...
I've got a repository with 2 solutions in it. Each solution is made up of multiple projects. One solution is .NET 4.8 the other is .NET CORE 3.1.
These solutions run locally in docker containers.
In VS2019 I can attach to process and debug both of these containers/solutions. When I look at the modules window I can see "User Code - Yes" and "Symbol Loaded - Server Side Symbol" (or something similar to that).
In VS2022 I can attach and debug the .NET 4.8 solution but when I attach to the .NET CORE 3.1 solution I get an warning message saying:
"The breakpoint will not currently be hit. No symbols have been loaded for this document".
When I look at the modules window in VS2022, I can see my DLLs are all marked as "User Code - N/A" and "Cannot find or open the PDB file".
Additionally, if I right click the DLLs and select Symbol Load Information, I can see something like this:
C:\solution\src\Project\MyStartUpProject\rendering\bin\container\Debug\netcoreapp3.1\MyComponentProject.pdb: Cannot find or open the PDB file.
C:\solution\src\Project\MyStartUpProject\rendering\bin\container\Debug\netcoreapp3.1\MyComponentProject.pdb: Cannot find or open the PDB file.
C:\solution\src\Feature\MyComponentProject\rendering\obj\container\Debug\netcoreapp3.1\MyComponentProject.pdb: Cannot find or open the PDB file.
What's odd about this is that C:\solution\ is the folder location in the Docker Container, not on my local drive. C:\solution\ is a mounted volume in my container and it mounts to C:\source\reponame\ on my computer, so I guess this is why the PDB file can not be found...
So my questions are...
Why is VS2022 looking at C:\solution\ not C:\source\reponame\ (or some how retrieving the DLLs the same way as VS2019)
and
Is there a way to have VS2022 look in the correct location? (I don't really want to add a Symbol Path to VS for each project I work on, especially as these could change).
Cheers,
Dan
I've reinstalled Visual Studio Mac, deleted all bin and obj folders, cleaned and rebuilt my solution.
But I can't navigate to symbols. It says...
Cannot navigate to the symbol under the claret.
Any ideas? Is there a stash of VS data somewhere that I can delete with extreme prejudice?
Have you already searched your hard disk with "Visual Studio" or something? Maybe there're some files somewhere.
One project appeared twice in the solution file. I removed one of the references.
First time user of Lua and installed version 5.3.5 then tried to install the IDE - ZeroBrane Studio.
Unfortunately when I start ZeroBrane Studio it says the following:
Failed to initialize editor
The lua511.dll could not be found or loaded, please check the working directory of the application.
There is something completely wrong, as there is no lua511.dll, only lua51.dll, and I can find no references to lua511.dll anywhere in the project or generated binary files.
If you are launching the IDE using zbstudio.exe, you can also try launching it using bin\lua src\main.lua command to see if it makes any difference. You can also try launching bin\lua to see if it launches (as it depends on the same lua51.dll library).
If you are launching it using a shortcut, then check its "Properties" and set "Start in" to the location where you installed the IDE (the location of zbstudio.exe file).
As my experience, I have never seen a lua511.dll and if it says that then there must be something wrong with your program.
There should only be a lua51.dll, although if you'd like, you can just rename it to lua511.dll but there should be a more professional fix towards it.
As this just may be a grammar issue, make sure your lua51.dll is actually there, or if it might be in the wrong directory. If it's in the right directory or if its there then do reinstall it with common troubleshooting tips.
I followed the steps to integrate Dotfuscator into my Xamarin.Android project as described here, but when it's time to build the project, I'm getting the following error:
The "_DotfuscatorXamarin_DetermineDefaultInputsTask" task failed unexpectedly.
2>\path\to\PreEmptive.Dotfuscator.Xamarin.targets(570,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
2>\path\to\PreEmptive.Dotfuscator.Xamarin.targets(570,5): error MSB4018: at InlineCode._DotfuscatorXamarin_DetermineDefaultInputsTask.Execute() in \path\to\AppData\Local\Temp\eruovv3u.0.cs:line 106
2>\path\to\PreEmptive.Dotfuscator.Xamarin.targets(570,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
2>\path\to\PreEmptive.Dotfuscator.Xamarin.targets(570,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
I have looked and looked online, but no one seems to be having this issue. I think the problem has something to do with generating the default configuration file on the first build. Any ideas?
UPDATE: This issue has been fixed in newer versions of Dotfuscator. See the detailed instructions for the free Dotfuscator Community and for the commercially-licensed Dotfuscator Professional. The original answer follows below.
Full Disclosure: I am a developer of Dotfuscator at PreEmptive Solutions, and am answering this question in that role.
You're right, the problem is the default config file generation in the targets file (PreEmptive.Dotfuscator.Xamarin.targets) - sorry about that. Specifically, the build integration is attempting to discover project references, but expects the classic MSBuild project format, not the new minimal one used by .NET Standard.
You can work around this issue as follows:
In the targets file, locate the _DotfuscatorXamarinConfigTemplateLines property and copy its value (within the CDATA section) to a new file named DotfuscatorConfig.xml (or whatever value you supplied for the DotfuscatorXamarinConfigFileName property in your project file) in the same directory as your project file.
In Visual Studio, build your project once in a configuration you want to protect (e.g., AnyCPU|Release). It will error, because the new config file doesn't have any input assemblies yet, but by building now we get those assemblies in the right location for configuring Dotfuscator.
Open Dotfuscator's user interface.
For Community Edition, from Visual Studio, open the Tools menu and select PreEmptive Protection - Dotfuscator.
For Professional Edition, run Dotfuscator Professional Edition from the Start Menu.
In the user interface, File | Open the file created in step 1.
On the Inputs screen, click the "Add Input" button (a green plus-sign in Community Edition, a folder-opening icon in Professional Edition).
Browse to your project directory, then obj\Release\DotfuscatorXamarin\dfin, and then select the assemblies you want to protect.
Substitute Release with the appropriate directory for the configuration you built in step 2.
You should select assemblies that correspond to projects in your solution, and not select third-party and assemblies that are part of the framework.
Save the config file.
Navigate to the Project Properties editor.
In Community Edition, go to the Build Settings screen and select the Project Properties tab.
In Professional Edition, go to the Settings tab and select the Settings > Project Properties screen.
Add the following project properties (instructions for Community Edition, and for Professional Edition):
Property name InDir, value obj\Release\DotfuscatorXamarin\dfin
Property name OutDir, value obj\Release\DotfuscatorXamarin\dfout
Property name ReportDir, value DotfuscatorReports\Release
Substitute Release with the appropriate directory for the configuration you built in step 2. Note that the directories pointed to by OutDir and ReportDir won't exist on-disk yet.
Save the config file.
Return to the Inputs screen and select an input and click the pencil icon. Edit the path to the assembly from an absolute path to ${configdir}\${InDir}\AssemblyName.dll, substituting AssemblyName.dll for the actual name and extension of the assembly. Repeat for each input assembly.
Save the config file (and commit it to source control).
Rebuild the project in Visual Studio. The build integration will use your config file instead of trying to generate a new one.
on top of the Joe's marvelous solution I ended up changing one value from true to false with regards to the instructions on https://www.preemptive.com/dotfuscator/pro/userguide/en/getting_started_xamarin.html#pctoc-setup
to get my android solution to build/run.
<DotfuscatorXamarinGenerateNewConfigFile>false</DotfuscatorXamarinGenerateNewConfigFile>
I've been configuring the Dotfuscator Community Edition at Xamarin.Android project according to this user guide. And I also had the following build error (pretty the same as #AxiomaticNexus):
Error The "_DotfuscatorXamarin_DetermineDefaultInputsTask" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object.
at InlineCode._DotfuscatorXamarin_DetermineDefaultInputsTask.Execute() in c:\Users\user\AppData\Local\Temp\wqhfhbsk.0.cs:line 106
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() eKey.Droid C:\VSProjects\dotFuscatorTest\PreEmptive.Dotfuscator.Xamarin.targets 570
I've fixed this issue using #Joe Sewell's Full Disclosure.
I hope PreEmptive Solutions will realese the fixed version asap!!!
At some point I was missing the file PreEmptive.Dotfuscator.Xamarin.targets in the root of project. I already executed the instructions above described by Joe Sewell, but later noticed the missing file.
Error were like this:
Error The "_DotfuscatorXamarin_DetermineDefaultInputsTask" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object.
at InlineCode._DotfuscatorXamarin_DetermineD efaultInputsTask.Execute() in c:\Users\hieta\AppData\Local\Temp\k3a5f2bj.0.cs:line 106
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() WorkSafe.Droid
Just FYI if anyone else could avoid waste of time.
When I try to create an archive from Visual Studio to distribute my Xamarin Android App, the Archive Manager fails with the message:
"Failed to create App archive 'MyCompanyName.Client.Droid'.
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."
Unfortunately the Archive Manager does not tell which file is causing the problem.
I already tried to move the project and the nuget packages to a root folder but this doesn'n help.
If you're using Windows 10 Anniversary Update, it does not hurt to enable long path inside Windows.
Press Windows key + R to open the Run dialog. Type gpedit.msc.
Navigate to: Computer Configuration > Administrative Templates > System > Filesystem
Double click on "Enable Win32 long paths". Enable it.
Alternatively, if you don't see this option click on NTFS > Enable NTFS long path.
Restart Visual Studio 2017. Done!
source
In my case in using Visual Studio 2017, when I saw the error, I just closed Archive Manager. Then when I reopened Archive Manager, the error is gone and I can continue to distribute the package. It works everytime for me, hopefully it works for you too.
It took me quite some time, hope this Q&A will save others this time.
It turned out that the Archive Manager is using quite a long path for the archive.
Because the project name included our long company name, some (fully qualified) file names became too long, like:
C:\Users\marcel\AppData\Local\Xamarin\Mono for Android\Archives\2016-12-06\MyLongCompanyName.Client.Droid 12-06-16 12.03 PM.apkarchive\mSYM\com.mylongcompanyname.client.droid.apk.mSYM\11b0326b39654e09a35393ebb19e1b1f\MyLongCompanyName.Client.CachedRepositories.dll.mdb
Changing the project name to a short name solved the problem.
There is a different answer on StackOverflow that IMO addresses the root issue. It worked for me and I recommend it.
Today I encountered the same problem
compiling the package is up and running again after deleting all of the items contained in the folder:
C:\Users\Administrator\AppData\Local\Xamarin\Mono for Android\Archives
I hope it help you
Andy