Unable to view designer in VS2010 due to DLL over the network - wpf

I am getting the error -
Unable to load the metadata for assembly 'Aurora.UIResources'. This assembly may have been downloaded from the web. See http://go.microsoft.com/fwlink/?LinkId=179545. The following error was encountered during load: Could not load file or assembly 'Aurora.UIResources, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
I am referencing the file over the network and the application will run and work just fine. I just can't seem to see the 'preview' in the designer. I am running Windows 7 Enterprise 64bit.
Does anyone have an idea on how to resolve this?

See this
This seems to work for some people
"Open devenv.exe.config (in C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE on my machine), and add this"
<runtime>
<loadFromRemoteSources enabled="true" />
....
</runtime>

Related

VS2017 15.4 Preview "Windows Application Packaging Project" tool failed to generate a working app

I added the new "Windows Application Packaging Project" that comes with vs2017 15.4 preview.
When adding my project to the "Applications" and debugging the packaging project I have the following error:
System.IO.FileNotFoundException: 'Could not load file or assembly
'System.Runtime, Version=4.1.2.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
system cannot find the file specified.'
InnerException: FileNotFoundException: Could not load file or assembly
'System.Runtime, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
system cannot find the file specified.
My project is running perfectly if I debug it directly or run it directly using the EXE.
If I extract the files from the .appxbundle and try to start the EXE, it doesn't work either. (XXXXXX.appxbundle\XXXXXX.appx\*.*)
I noticed that in the extracted .appxbundle folder, all System.XXX DLLs are not there. They should be (94 dlls are missing).
Is there a problem with the packaging tool ?
UPDATE:
Link to dev portal: https://developercommunity.visualstudio.com/content/problem/122252/windows-application-packaging-project-tool-failed.html
This is very likely a bug in the way the packaging project is collecting files. Looks like we're already tracking this bug in the Developer Community. Also, we're tracking another related issue for ClickOnce.

Could not load file or assembly Microsoft.SqlServer.TransactSql

Database project build failed. Error Details:
Error: MSB4018: The "SqlBuildTask" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.TransactSql, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The
system cannot find the file specified.
File name: 'Microsoft.SqlServer.TransactSql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
I also go through this answer on stackoverflow link. Also Download SQL Server Data Tools 12.0.41012.0, but still facing this error. Need assistance to build database so that I may publish my Database on Azure.
Regards.
Uncheck "Enable extended...". It will be removed in next version of VS. (Click on link 'More Information' next to it.)
This happened to me also and just fixed. I update ssdt from the link i get from Visual studio notification center and restart VS as administrator then it works fine.
-Janak

Could not load file or assembly 'System.Data.SqlServerCE'

I'm trying to connect to an external .sdf file using VB.NET in VS2012. I'm having issues working with the System.Data.SqlServerCE DLL.
When I don't Copy Local I get the error: Could not load file or assembly 'System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
If I do Copy Local I get: Could not load file or assembly 'System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I have SQL Server Compact version 4 installed, so I'm referencing the DLL in "C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v4.0\Private". I've tried adding this DLL from other locations and will get the "Found conflicts between different version of the same dependent assembly" warning. If I click on that it'll add the following to the app.config:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845DCD8080CC91" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
Once that is added to app.config I get this error:
Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8876. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.
One thing I noticed earlier was that System.Data.SqlServerCe was not in the C:\Windows\Microsoft.NET\assembly folder. I installed the DLL using gacutil.exe and changed the
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1"/>
in app.config to
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
(4.0.0.0 is the version listed by the gacutil).
This got me past the assembly errors at least. :)
It's too soon to post an answer for myself, so I'll just leave this edit.
I manage to fixed the above issue by using C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Desktop\System.Data.SqlServerCe.dll. So the System.Data.SqlServerCe.dll in path C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Private doesn't work.

Server Error in '/' Application. Windows Serrver 2012 IIS 8

I received a webpage from a developer and when I try to install it on my fresh installation of Windows Server 2012 with IIS 8 I get the following error:
Could not load file or assembly 'System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
I tried to download Windows SDK on my laptop and then copy the gacutil.exe onto the server and run:
C:\tmp>gacutil.exe /I C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.WebPages.Razor.dll
But I still get the same error. Anyone familiar with this?
I am no .NET-developer what so ever. I have no idea what to do. Do I need to install something else on my Windows Server?
You are missing the System.Web.WebPges.Razor file from the bin directory of the web application. Unless that version is installed in the GAC, try putting a copy of it in the bin directory so the application can access it.

Using EF Reverse Engineer Code First wizard, getting error after installing Silverlight 5

I used the wizard once last week with no problems. Now, after installing Silverlight 5 I get:
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF.Utility.CS.ttinclude(1024,76) : error CS0433: Compiling transformation: The type 'System.Xml.XmlReader' exists in both 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v5.0\System.Xml.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.XML.dll'
I realize you asked this forever ago but I happened upon a solution that worked for me...
This is actually a bug in the EF Power Tools that they are actively working on ...
If you edit
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF.Utility.CS.ttinclude
or
EF.Utility.VB.ttinclude if you are using VB
change the assembly lines that include the XML assemblies to explicitly not use the SL libraries then it starts working
so change them to
<## assembly name="System.Xml, Version=4.0.0.0, Culture=neutral" #>
<## assembly name="System.Xml.Linq, Version=4.0.0.0, Culture=neutral"#>
Then it should start working

Resources