Error opening project in VS2013Pro from VS2013Express - visual-studio-2013

I wrote a WebSite Project and a Web Api Project in Visual Studio 2013 Express for Web.
Now I installed additional to VS2013Web from my MSDN subscription Visual Studio 2013 Pro.
When I try to open my Projects in Pro, I get an error:
The Microsoft.VisualStudio.Web.Project.WebProjectPackage,Microsoft.VisualStudio.Web.Project package did not load correctly.
I should have a look into my ActivityLog.xml.
And there is:
<entry>
<record>273</record>
<time>2014/04/08 08:37:13.725</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Microsoft.VisualStudio.Web.Project.WebProjectPackage, Microsoft.VisualStudio.Web.Project]</description>
<guid>{AAB75614-2F8F-4DA6-B0A6-763C6DBB2969}</guid>
<hr>80070002</hr>
<errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Web.AzureAD.Contracts, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Das System kann die angegebene Datei nicht finden.</errorinfo>
</entry>
<entry>
<record>274</record>
<time>2014/04/08 08:37:13.730</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [Microsoft.VisualStudio.Web.Project.WebProjectPackage, Microsoft.VisualStudio.Web.Project]</description>
<guid>{AAB75614-2F8F-4DA6-B0A6-763C6DBB2969}</guid>
<hr>80070002</hr>
<errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Web.AzureAD.Contracts, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Das System kann die angegebene Datei nicht finden.</errorinfo>
</entry>
I still have VS2013Web installed. If I open my Project with this Version, everything is fine.
Any ideas, how to fix the Problem?
Might this error Comes up, because VS2013Web is in german and VS2013Pro is in english?
I tried also in NuGet Console:
Update-Package -Reinstall
But this breaks my web Project totally...

Could not load file or assembly 'Microsoft.VisualStudio.Web.AzureAD.Contracts...
"Azure" is surely the keyword here, Express does not support Azure out of the box. As described in this MSDN page, the Azure Tools must be installed and you must have the Web version of Express.
It is a separate download. You'll find the VS2013 Express for Web version of it here, pick the upper left one to get the installer.

Try like this -
Close Visual Studio 2013
Click the TOOLS--->VISUAL STUDIO COMMAND PROMPT to open the command window
Input the command "devenv /Setup"
Restart Visual Studio 2013

Related

ODT and Visual Studio -- total fail

I'm not an Oracle guy and need to use it from Visual Studio. I installed Oracle Data Tools for Visual Studio 2015 but can't get by some odd error messages. The first time I start VS and try to add a new connection (any connection), I get the message:
Oracle Data Provider for .NET has been installed without a
machine-wide configuration. However, a version of Oracle Data Provider
for .NET has been detected in the Global Assembly Cache which may be
incompatible. Please remove Oracle Data Provider for .NET from the
Global Assembly Cache and restart Visual Studio.
This is odd, because I just did exactly what the message said. The next time I started VS, the error popped up again.
If I OK that message, I get another one:
Failed to find the default tnsnames.ora. Could not load type
OracleInternal.Common.ConfigBaseClass' from assembly
Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=Neutral,
PublicKeyToken=89b483f429c47342
I'm not at all sure what that means.
Any ideas out there?
UPDATES:
Didn't create tnsnames.ora (don't know how to). Did I miss a step in installation? (Don't remember that being mentioned). In the machine config I have:
<section name="oracle.dataaccess.client" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
Oracle is not found in the user.config file. the dll info:
C:\Program Files (x86)\Microsoft Visual Studio 14.0>gacutil /l Oracle.ManagedDat
aAccess
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=8
9b483f429c47342, processorArchitecture=MSIL
No .NET config file at this point. in VS I'm just trying to connect with server Explorer
Did you create any tnsnames.ora file? If yes, where did you save it. Unlike other clients, ODP.NET Managed Driver does not use TNS_ADMIN variable from environment settings or Registry.
Check content of <oracle.manageddataaccess.client> element in your .NET config files %windir%\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config, resp. of <oracle.manageddataaccess.client> element in your .NET config files %windir%\Microsoft.NET\Framework\v4.0.30319\Config\machine.config and/or local config files (user.config and web.config)
See Data Provider for .NET Developer's Guide for more information.
Compare configuration in .NET config file , e.g.
<configuration>
<configSections>
<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
with actually installed DLL, e.g.:
C:\Program Files (x86)\Microsoft Visual Studio 11.0>gacutil /l Oracle.ManagedDataAccess
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.18020
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
Oracle.ManagedDataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=MSIL
Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=MSIL
Number of items = 2
C:\Program Files (x86)\Microsoft Visual Studio 11.0>
The TNS names error is due to a missing TNSNames.ora file, usually found in the C:\app\userprofile\product\11.2.0\client_1\network\admin for Oracle 11g. The TNSnames.ora file contains the database connection information. You didn't say what version of the Oracle Client you installed, so the version number may be different. I always install a full client and during that process the TNS configuration program runs and installs and configures the TNSNames.org file. I'm not familiar with Oracle Data Tools for Visual Studio 2015, but there must be some sort of configuration tool to connect you with the database.
To install the full client, you can download the install from Oracle.com at this link:
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
Installing the full client will also resolve the GAC problem as well. Apparently the version installed is not compatible with your database installation.

a new build error after making change by replacing version=10.0.0.0 with 11.0.0.0 in VS2010

I got the same problem as Build Error + Creating VSTO addin for excel 2010
After making the change according to the solution, I got the new error:
The "InitializeDefaultProperties" task could not be loaded from the
assembly
Microsoft.VisualStudio.Tools.Office.BuildTasks, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or
assembly 'Microsoft.VisualStudio.Tools.Office.BuildTasks,
Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one
of its dependencies. The system cannot find the file specified. Confirm
that the <UsingTask> declaration is correct, that the assembly and all its
dependencies are available, and that the task contains a public class that
implements Microsoft.Build.Framework.ITask.
I have installed VS2013 on the same machine so I change version=12.0.0.0 but I got a new error:
Error 2 The "SetInclusionListEntry" task could not be instantiated from
the assembly "Microsoft.VisualStudio.Tools.Office.BuildTasks,
Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Please verify the task assembly has been built using the same version of
the Microsoft.Build.Framework assembly as the one installed on your
computer and that your host application is not missing a binding redirect
for Microsoft.Build.Framework. Unable to cast object of type Micro
soft.VisualStudio.Tools.Office.BuildTasks.SetInclusionListEntry' to type
'Microsoft.Build.Framework.ITask'.
I know it's an old post, but maybe I have a solution for you...
I ran into exactly the same problem and I have to tell you that the "InitializeDefaultProperties" exception is not fix-able for VS2010.
First of all:
Make sure that your Visual Studio 2010 installation is not modified, anyway make a clean install just to be sure.
If you modified the C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets revert your changes.
If you now try to build your VSTO Project the following error should apppear:
The "FindRibbons" task could not be loaded from the assembly
Microsoft.VisualStudio.Tools.Office.BuildTasks, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file
or assembly 'Microsoft.VisualStudio.Tools.Office.BuildTasks,
Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or
one of its dependencies. The system cannot find the file specified.
Confirm that the <UsingTask> declaration is correct, that the
assembly and all its dependencies are available, and that the task
contains a public class that implements
Microsoft.Build.Framework.ITask.
My Solution:
--> Open Visual Studio 2010 (you dont need to load a Project)
--> Go to Help an click About Microsoft Visual Studio
--> Check Version
Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1Rel Microsoft
.NET Framework Version 4.5.51209 SP1Rel
If it says RTMRel download the Microsoft Visual Studio 2010 SP1 from here: http://go.microsoft.com/fwlink/?LinkId=210710
It includes the necessary VSTO and VSTO 4.0 Runtime.
If thats not the Problem, I'm sorry...
As I encountered the same problem upgrading our build server... I am gonna put the solution here in case anyone needs it.
I think the way to solve this is to fix your GAC.
Open the .target file of that tool by notepad and take a look at the UsingTask tag, you should get something like
<UsingTask TaskName="InitializeDefaultProperties" AssemblyName=" Microsoft.VisualStudio.Tools.Office.BuildTasks", Version=11.0.0.0,..., PublicKeyToken=sthsthsth
Then, go to your GAC files, e.g. C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Office.BuildTasks
Then, create a new folder: v4.0_11.0.0.0_sthsthsth,
which is:
v<.NETFramework Version, mostly 4.0>_<Assembly Version>_<PublicKeyToken>
And then, put the .dll file of Microsoft.VisualStudio.Tools.Office.BuildTasks in it.
This dll should be obtained when you install VSTO either by directly install (VSTO2010) or by Visual Studio installer
e.g.
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.BuildTasks.dll
for Visual Studio 2017 and then directly place the dll inside the folder created
Then this issue should be fixed. Good luck

Azure Sdk for vs2013.4 does not work

It all started a few days ago when I began getting this error when starting vs2013:
That was for no apparent reason, I installed no new extensions nor update any of the existing. Didn't change any setting either.
The ActivityLog.xml shows the following:
<entry>
<record>37</record>
<time>2015/05/20 08:45:55.977</time>
<type>Error</type>
<source>VisualStudio</source>
<description>CreateInstance failed for package [ResourceManagerPackage]</description>
<guid>{7C6A3AE5-F469-4D51-B52D-50393DEC9432}</guid>
<hr>80070002</hr>
<errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Azure.ResourceManager.Contracts.1.0, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</errorinfo>
</entry>
<entry>
<record>38</record>
<time>2015/05/20 08:45:55.977</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [ResourceManagerPackage]</description>
<guid>{7C6A3AE5-F469-4D51-B52D-50393DEC9432}</guid>
<hr>80004005 - E_FAIL</hr>
<errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Azure.ResourceManager.Contracts.1.0, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</errorinfo>
</entry>
So far I have tried:
devenv /safemode -> /resetskippkgs -> /installvstemplates -> /resetsettings -> /resetuserdata
devenv /setup
Repairing Azure SDK installation (version 2.6)
Completely uninstalling and resintalling Azure SDK (version 2.6)
None of this worked and I can't find anything else on the web to try. Completely stumped.
Is there anything else I can try?
Thanks.
From the responsible team at MSFT: We haven’t identified the root cause of this issue yet, but this solution usually works in the interim.
Close Visual Studio
Find and Uninstall the Azure Resource Manager Tools (VS XX) - vX.X
gwmi win32_product | ? {$.Name -Like "Azure Resource Manager Tools*"} | % {msiexec /x $.IdentifyingNumber /qb}
Repair the matching Microsoft Azure Tools for Microsoft Visual Studio 20XX - vX.X" (You can also do this from ARP)
gci "$env:ProgramData\Package Cache\MicrosoftAzureTools.*.exe" -Recurse | % {. $_.FullName /modify}

Cannot start visual studio 2010

Am using visual studio 2010 - enterprise edition
when i try to start my visual studio it gives the error "Cannot load file or assembly : presentationcore "
I found this on the event log too
.NET Runtime Optimization Service (clr_optimization_v4.0.30319_32) - 1>Failed to compile: PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 . Error code = 0x80070002
any help will be grate full

Could not load file or assembly 'Microsoft.VisualStudio.Web.PageInspector.Loader

Could not load file or assembly 'Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\11.0\WebDev.WebServer40.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = TTLWIN2K\miralp
LOG: DisplayName = Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = file:///C:/SVN/temp/components/src/MasterpassProxy/src/Webservice/
LOG: Initial PrivatePath = C:\SVN\temp\components\src\MasterpassProxy\src\Webservice\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\SVN\temp\components\src\MasterpassProxy\src\Webservice\web.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
I just ran into the same problem, and the culprit was my uninstalling of Visual Studio Express 2012. It's possible that it might be any version of Visual Studio, as comments on this answer are indicating the issue still happens with Visual Studio 2019. My overall order of operations was:
Installed Visual Studio Express 2012 (long time ago)
Used Visual Studio Express 2012 happily for many months
Installed Visual Studio 2013 Premium
Used Visual Studio 2013 Premium happily for weeks
Uninstalled Visual Studio Express 2012
ERROR
I'm not 100% certain on the cause of it, or what combinations of Visual Studio versions would exhibit this behavior. But the solution for me was to edit the root web.config files in the framework directories:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config
(For different framework versions you may have different folders.)
And remove the nodes:
<remove assembly="Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Be careful not to remove any opening/closing parent nodes which are also on the same line(s) as these.
This resolved the issue for me.
No need to remove those lines
Just close and reopen the Visual studio with Admin privileges.
I got the same problem but not on my development machine but on hosting server.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config
I was able to fix it by adding below code to my web.config
<compilation targetFramework="4.5">
<assemblies>
<remove assembly="Microsoft.VisualStudio.Web.PageInspector.Loader,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</assemblies>
</compilation>
or by removing reference to this assembly from web.config files in framework directories.
I never installed VS there and i never had PageInspector installed there. Any idea why those configs reference them?
Update: fixed in Visual Studio 2019 Version 16.0.3 according to this page.
If this happens after upgrading to Visual Studio 2019 RC, the following workaround helped:
Find the download cache directory
Use Explorer or better to find the AspNetDiagnosticPack.msi within this directory.
Run (double-click) the AspNetDiagnosticPack.msi file (this will force the installation of this MSI).
Workaround found here
I had this issue after installing Visual Studio 2019 (whilst 2017 was still installed). It's caused by a missing component - AspNetDiagnosticPack.msi - that fails to install a required package into C:\ProgramData\Microsoft\VisualStudio\Packages\
The solution that worked for me was this:
Close Visual Studio
Download the package from:
https://download.visualstudio.microsoft.com/download/pr/e13d544f-5a3c-4bb3-9a7c-1e56b1f90e10/f8e5888ff01a7009ef8c2ef16aa02ab9/aspnetdiagnosticpack.msi
Run the installer and install.
This should fix it.
More information can be be found: https://developercommunity.visualstudio.com/content/problem/398640/could-not-load-file-or-assembly-microsoftvisualstu-7.html
For those who might end up here, try removing the following line in the Web.Config file of your Project while debugging
<identity impersonate="true" userName="blah" password="blah">
It took time until I finally came across the following thread:
Could not load file or assembly or one of its dependencies. Access is denied. The issue is random, but after it happens once, it continues
I've ran into this error while trying to run an ASP.NET project in VS2013 after having uninstalled a VS2015 preview. Repairing the VS2013 installation seems to have solved the problem.
I got this answer is perfect for me
No need to remove those lines
Just close and reopen the Visual studio with Admin privileges.
I removed the dll from gac and it started working. I am not sure where those dlls came from. If you have 2 or more versions of visual studio, reinstall the last version.
Try updating your Microsoft.ApplicationInsights nuget package. This also installs other dependencies. I ran into this problem when I had to change my Target Framework.
Tools > NuGet Package Manager > Manage NuGet Packages for
Solution...
search for "applicationinsights"
or run
Install-Package Microsoft.ApplicationInsights
Had a similar problem (another assembly) and for me it was a missing line in the web.config on the machine. A line that I think lets the web server load (any?) dll.
I had to add "*" to the compilation-assemblies list in the web.config:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config
Like this
<compilation>
<assemblies>
...
<add assembly="*" />
</assemblies>
</compilation>
To find it I had to compare the file with one from a working server.
So it seems to me that It really is a load failure, but to determine why it fails, we need to be Sherlook H..
Normally I use a tool like ProcessMonitor to find out why I get a Load Failure, but this time, of course, it gave me no useful output.. IIS never tried to load the assembly!
If you don't see web.config in both of paths:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config
file "Web" is in "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\" what I really want to show you, It's Web.config, you should open it with: notepad++... and remove:
//<remove assembly="Microsoft.VisualStudio.Web.PageInspector.Loader,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />"
I finish my problem with them.
Our project had (incorrectly) reference to the PageInspector.Loader.dll in the GAC for a long time:
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.Web.PageInspector.Loader">
<HintPath>..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.Web.PageInspector.Loader\v4.0_1.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Web.PageInspector.Loader.dll</HintPath>
</Reference>
</ItemGroup>
It worked for some time, but recently deployment to Azure caused the error "Can not find compilation library location for package Microsoft.VisualStudio.Web.PageInspector.Loader".
We found and deleted the reference from .csproj file and the problem was fixed.
I opened today a 10 year old project and encounter this issue in VS 2019 (16.9.1), in my case it was
<trust level="Medium"/>
removing above line from the web.config or setting <trust level="Full"/> solved this issue.
I know this is an old one but I ran into this error when debugging with Visual Studio 2010 (I also run 2013, 2017 and 2019 on the same machine...I have a few legacy apps :oP). In my case, I debug using local IIS as webserver (not express) and I ended up having to recycle the websites Application Pool which did the trick to clear the error (after restarting 2010).
Dave
it solved the problem on at my end by applying the approved solution in this thread.
modifying the following two files, and removing Microsoft.VisualStudio.Web.PageInspector.Loader resolved the issue.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config

Resources