How can I register SQLServerSpatial dll localy? When I try I run register assembly on [Microsoft.SqlServer.Types] with SqlServerSpatial130 as addintional file I get the following issue:
E_CSC_USER_CANNOTCREATESYSTEMASSEMBLY: Cannot create assembly XXX.[Microsoft.SqlServer.Types]' because 'Microsoft.SqlServer.Types, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' is a system assembly.
Description:
System assemblies cannot be created, altered or dropped.
Resolution:
Consider creating a user assembly to wrap desired functionality.
I can register the assembly in Azure Datalake but not localy. Is there a way to fix that?
Thanks on advance
I assume that you may have registered SQL Server on your local box or some other application that already registers Microsoft.SqlServer.Types as a system assembly.
If that is the case, you probably do not have to register it and refer to it with REFERENCE SYSTEM ASSEMBLY in your local run.
Related
My application is running fine on local, after i publish to azure web apps it gives me the error
Could not load file or assembly 'Microsoft.Practices.ObjectBuilder2, Version=2.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
how do I fix this? I do not even have the objectBuilder2, if its something I have to reference where do I get it?Please help
Microsoft.Practices.ObjectBuilder2 is part of Enterprise Library. See here
Do you use this library? If not, try to remove references to it. If you use it, then add appropriate .dll to your installation.
For me Microsoft.Practices.Unity references was broken. I've just removed and added it again and worked. Maybe any refereces to Microsoft.Practices.* that would be broken can show this error.
Place Microsoft.Practices.ObjectBuilder2.dll in bin folder of your web application, this will work.
I've successfully referenced an assembly via Nuget and project.json that is a "Portable" assembly. All my code compiles in the Azure function, but when it's run I get:
Could not load file or assembly 'System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The system cannot find the file specified.
As I understand it this is the portable version of System.Net, and Azure only preinstalls the 4.6 version of System.Net.
How do I work around this?
This is caused by a bug that has been addressed on the current Azure Functions host milestone and will be deployed with the next release (likely towards the end of the week). You can find more information about the issue and the fix here: https://github.com/Azure/azure-webjobs-sdk-script/issues/478
In the meantime, a workaround would be to copy System.Net from the Framework folder into a bin folder, inside of your function's folder. The host will automatically resolve it as a private assembly.
I have a web app which used ReportViewer, from which I am trying to delete ReportViewer and all its dependencies.
As far as I can see, I have deleted everything I need to and all works fine locally. However, when I deploy to our QA server and run the site, I get the following error:
System.IO.FileNotFoundException: Could not load file or assembly
'Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91' or one of its dependencies.
The system cannot find the file specified.
I suspect that some other dll in the system depends on the ReportViewer.WebForms.dll, but I cannot work out which one. This dll is not referenced directly from anywhere in the app.
Does anyone know what dlls commonly reference ReportViewer.WebForms.dll?
I think the dll's reside in GAC, causing this error. According to MSDN;
When you run ReportViewer.exe, the following files are installed in
the Global Assembly Cache folder on the deployment computer.
Microsoft.ReportViewer.Common.dll
Microsoft.ReportViewer.ProcessingObjectModel.dll
Microsoft.ReportViewer.WebForms.dll
Microsoft.ReportViewer.WinForms.dll
Microsoft.ReportViewer.DataVisualization.dll
Refer http://msdn.microsoft.com/en-us/library/ms251723.aspx for more clarification.
I am trying to deploy an CLR TVF (table value function). In the code I am using JavaScriptSerializer to parse some JSON string, so I reference the System.Web.Extensions dll and my problems start there.
Project builds fine, but when I try to register the dll I receive the following error:
Assembly 'my_assembly_name' references
assembly 'system.web.extensions,
version=4.0.0.0, culture=neutral,
publickeytoken=31bf3856ad364e35.',
which is not present in the current
database. SQL Server attempted to
locate and automatically load the
referenced assembly from the same
location where referring assembly came
from, but that operation has failed
(reason: 2(The system cannot find the
file specified.)). Please load the
referenced assembly into the current
database and retry your request.
I referenced system.web.extensions from:
C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Web.Extensions.dll
I can set copy load to true or manually copy the assembly but then referencing errors go deeper -
Assembly 'my_assembly_name' references
assembly
'system.servicemodel.activation,
version=4.0.0.0, culture=neutral,
publickeytoken=31bf3856ad364e35.',
which is not present in the current
database. SQL Server attempted to
locate and automatically load the
referenced assembly from the same
location where referring assembly came
from, but that operation has failed
(reason: 2(The system cannot find the
file specified.)). Please load the
referenced assembly into the current
database and retry your request.
Everything works fine until I reference the Web.Extensions.dll. Target Framework is .NET 4.
Any ideas/solutions?
Acording to the documentation, any .NET assembly can be referenced but each dependant assembly must also be registered in the database (visible in the "Programmability - Assemblies" node in SQL Server Manager).
Once the SQL Server Database has the dependant assemblies available they will be present in the Add Reference Dialog window in Visual Studio.
This SQL code below works. I had needed the System.Web.dll assembly
(you need the correct version my 2005 SQL is 64 bit)
CREATE ASSEMBLY [System.Web] AUTHORIZATION dbo
FROM 'c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\System.web.dll'
WITH PERMISSION_SET = UNSAFE
The system will try to automatically register dependent assemblies but can only do it from the same directory as the file you are attempting to register.
In my case it also registered the following assemblies in the database for System.Web to operate correctly...
System.Configuration.Install
System.Design
System.DirectoryServices
System.DirectoryServices.Protocols
System.Drawing
System.Drawing.Design
System.EnterpriseServices
System.Runtime.Remoting
System.Runtime.Serialization.Formatters.Soap
System.ServiceProcess
System.Web.RegularExpressions
System.Windows.Forms
My system is using 3.5 Framework so I cannot test importing System.Web.Extensions.dll for you but it may require other assemblies from another folder to register, and since it is a 4.0 assembly it may be referencing some 2.0 or 3.5 assemblies that are in a different folder.
I suspect you will end up with a rather large list of assemblies imported to get it to work but it is definitly possible to do.
The operation can probably be done more easily by having one folder with all the dependent dlls in it and register from there.
Sadly integration of the .NET Framework CLR with SQL Server 2005 / 2008 is only a limited subset of the framework and the System.Web.Extensions doesn't seem to be a supported assembly / namespace.
For a full list of supported assemblies check out MSDN: http://msdn.microsoft.com/en-us/library/ms403279.aspx
I built a web application that uses the J# libraries which works fine in my cpu, however, when I deploy it to my shared server. I get an error message: Parser Error Message: Could not load file or assembly 'vjslib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
So basically, the server doesn't have visual j# installed. The problem is they wont install it because it is a shared server.
Is there a way I can deploy the J# assemblies with my project so that it will work on the shared server without it being registered in the GAC?
Thanks for your help!!
Simplest solution: Try to copy the assemblies your application needs into the same folder where your application resides.
The following MSDN article explains How the Runtime Locates Assemblies.
Also, you may find more options (including copying all J# related dlls into a subfolder of the application folder if needed) in the following link when the runtime cannot find the assembly in the GAC: Locating the Assembly through Codebases or Probing
Without knowing anything about J# I can only suggest that you try just distributing the required libraries along with your program (place them in the same directory), I believe if it can't find the library in the GAC it will revert to look in the current directory.