Visual Studio IDE Error On Launch When Loading Project - visual-studio

I am loading my project into Visual Studio 2019 IDE. When I go into the forms designer within the IDE
Visual Studio Forms Designer has been gives me the following error:
An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch.
There is no code associated with it. All referenced DLLs haven't changed.
Has anyone else experienced this or have a work around as the Google searches I have done have given me to help. Is there a way to narrow down the error? I have also checked all the security dlls to make sure they are correct and are referenced locally to help. Maybe something to do with the CAS policy?
I have also tried on my installed versions of 2012, 2015, & 2017.
UPDATE: Updated the error above as I had the wrong error added.

Related

How do I add ArcObjects Version to a Visual Basic project?

I am developing a Visual Basic project in Visual Studio 2010 that uses ArcObjects. (I have ArcGIS 10.3 for Desktop.) I am getting the error "'RuntimeManager' is not declared. It may be inaccessible due to its protection level." A previous answer, Esri ArcObjects--Esri.ArcGIS.Version assembly, recommended adding a reference to Esri.ArcGIS.Version by clicking on Project, Add Reference, selecting it under .NET and clicking OK. I have tried to do this, but it's not under .NET. What can I do to make it available?
You should be able to find it if you use the Browse option.
The ESRI.ArcGIS.Version.dll file should be under your DeveloperKit installation folder. For me it is:
C:\Program Files (x86)\ArcGIS\DeveloperKit10.2\DotNet

Missing Method exception "System.Web.Routing.RouteValueDictionary System.Web.WebPages.TypeHelper.ObjectToDictionaryUncached(System.Object)

I've created a new project in Visual Studio 2013.2 with WebAPI and MVC enabled. Right out of the box, compiling the generated project and running gives me the exception. Looking around here, I've come across the following two questions:
Mvc 5.1 MissingMethodException System.Web.WebPages.TypeHelper.ObjectToDictionaryUncached
System.Web.WebPages.TypeHelper.ObjectToDictionaryUncached
Both these answers involve assembly redirects; however, in my case the assembly redirects are present and I'm still getting an issue. My problem is that the GAC is loading version 3.00.11001.0 which is listed under assembly version 3.0.0.0 and my application wants 3.20.20520.0 which is also listed as assembly version 3.0.0.0. (Note that in diagnosing the project I installed the 5.2 pre-release nuget package, but I had the same problem with the original versions, I just don't have those readily available)
Since the GAC is preferred over the bin directory, it seems that my development machine will always pull the wrong file.
Is it safe to remove these files from the GAC? It appears that these are required for Visual Studio to produce Razor intellisense
Removing the Assemblies from the GAC did behave exactly as expected. The Razor intellisense for the project stopped working; however, the application began functioning properly.
You have to add the reference of System.Web to get it working.

Visual studio redistributable & side-by-side / DependentAssembly error

(I'm running Windows7 and using Visual Studio 2010.)
I'm using ClamAV in a .NET Azure project, and I'm running into side-by-side errors whenever I run clamd.exe, either through my code or by running clamd.exe on it's own.
In Visual Studio 2010 I am getting the error:
Win32Exception was unhandled The application has failed to start
because its side-by-side configuration is incorrect. Please see the
application event log or use the command-line sxstrace.exe tool for
more detail
And in Event Viewer I get:
Activation context generation failed for
"C:\Users\pconerly\code\AntiVirus_source\WorkerRole\clamav\clamd.exe".
Dependent Assembly
Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.6195"
could not be found. Please use sxstrace.exe for detailed diagnosis.
When I searched for "8.0.50727.6195" it led me to the 2005 redist, so I downloaded it
http://www.microsoft.com/download/en/details.aspx?id=3387
After a restart I am still getting the side-by-side error. Additionally, I think that the redist installer is not completing it's install-- like it's seeing visual studio 2010 and saying "oh, that's good enough, no need for me to install". I haven't tried uninstalling 2010 and using 2005, because the rest of my Dev team is using VS 2010.
What's the deal? How can this be fixed? I'm ready to pull out my hair.
The link Timores posted is the update for Visual Studio. The actual redistributable package is this:
http://www.microsoft.com/en-us/download/details.aspx?id=26347
The version you mention is actually at found here
Microsoft Visual Studio 2005 Service Pack 1 MFC Security Update
Timores is right: the redist should be this one, which is related to this KB entry
As you can see there, msvcr80.dll has been updated to version 8.0.50727.6195.
It is the "security update" of the "SP1" of the 2005 C++ runtime..
Your exe probably requires (through an internal manifest) that specific version.
If it is not found on the system (there's a lot of places searched for) nor in the current folder (with a suitable manifest aside) it won't load the exe since it is not able to "activate the context", that is load the specific DLL required in the manifest.
I had similar issues when my system got updated (windows updates) and the newly compiled EXEs were not working with an old-versioned runtime placed on the same folder.
I had to update msvcr80.dll and its manifest (which I found deep in \windows\winsxs) to make everything work.
Context activation is a tricky matter, anyway :)
HTH

designer crash visual studio 2010 for windows phone 7

I'm having all kinds of problems getting Visual Studio 2010 to work with the Windows Phone 7 templates. All I have is a default portrait view added to the project, and the designer gives me the following error:
System.IO.FileNotFoundException
Could not load file or assembly 'Microsoft.Phone, Version=7.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e' or one of its dependencies. The system cannot find the file specified.
followed by a bunch of crap that doesn't seem too helpful. If I rebuild the project and refresh the designer, it momentarily appears correctly (less than a second), and then Visual Studio crashes and tries to restart.
Anyone have any idea why this might be happening?
Well, sounds like the install didn't go well. Verify that this reference assembly is located where it is supposed to be, the default install location is c:\program files\reference assemblies\microsoft\framework\silverlight\v4.0\profile\windowsphone. Randomly retrying to reinstall might pay off but do check your machine health first, this doesn't go wrong very often. Ask questions about that at superuser.com

.net 4.0 with Code Access Security NetFx40_LegacySecurityPolicy won't work

I'm trying to use an external library DevExpress.XtraTreeList.v8.1.dll in my vsto office addin built using VS2010 beta 2. I am getting the following compile time error:
DevExpress.Utils.AppareanceObject threw an exception --> System.NotSupportedException.
The error message goes on to say that for compatibility reasons I can use the NetFx40_LegacySecurityPolicy switch.
I've tried putting this config variable in all of the following locations:
1) my applications config file.
2) C:\Windows\Microsoft.NET\Framework\v4.0.21006\msbuild.exe.config
3) C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\dev.exe.config
None of these have resolved the problem. Here were the references I've used.
re-enable cas
msdn.microsoft.com/en-us/library/ee191568(VS.100).aspx
How do I get rid of this error so I can build the application in vs 2010?
LC.exe fails to process license information of devexpress 9.1.4 dlls
Update: Looks like this program is related to lc.exe. create a file called lc.exe.config that contains
<NetFx40_LegacySecurityPolicy enabled="true"/>
under C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\ (NETFX 4.0 Tools) solves the problem
This does work, however, you'll also need to create a file for devenv.exe.config to edit form designer changes, and the side effect of that is that COM references in project's will give obscure errors.
The end result, is that we really need an update from DevExpress on this. Allegedly a beta fix with a 2010.1 release is due any time now, come on DevExpress, hurry up! :)

Resources