This is the first dll I have made. It's purpose is to grab territory names from a database and return as an mdx set. The dll compiled perfectly fine, but when I go to deploy the dll as an assembly in bids to my cube, I get the following error:
Clr Assembly must have main file specified error
The dll is supposed to be like a ssas stored procedure so I can set permission in a role for ssas.
Thanks!
Ethan
I finally figured out a solution! I believe that because of the msmgdsv.dll being of framework 2.0 I didn't like the file, so I changed the target framework under the project properties to Framework 2.0 from Framework 4.0. I then went to deploy everything from BIDS and instead of an error, It deployed!
Related
I am editing some existing code, and as part of the changes I need to add a column to each of two datasets (.xsd in Visual Studio Solution Explorer).
One worked fine - open the designer, right-click, add column.
The second gives the following error:
"Failed to add column. Failed to find or load the registered .Net Framework Data Provider."
As these are both in the same project, I'm confused as to why this one is failing when the other is not.
The only difference I can think of, is that the one that works is selecting from the database directly (SELECT ... FROM TABLENAME); whereas the one that fails is selecting from a database function (SELECT ... FROM dbo.FunctionName(#param) AS ALIASNAME)
Wherever I've looked, people suggest it's an error with the .settings / .config files; but because one works and one fails, I can't see how this can be an issue with references?
This is in a standard vb project in VS2005, that compiles to a DLL - so it's not asp.net.
--Edit--
Right-click, Preview Data also gives the same error.
--Edit2--
When I try and Add a DataSource, I get the following error:
This SQL Server version (10.50) is not supported.
I have SQL Server 2005, and SQL Server 2008 R2 installed, both with latest service packs.
I tried two things simultaneously, and one of them worked:
I installed the following patch from Microsoft: https://www.microsoft.com/en-us/download/confirmation.aspx?id=15680
I rearranged my machine.config file (SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config), so that in the DbProviderFactories section the one I am using is at the top of the list.
i am working on vb .net project. it was working fine till yesterday. i m trying to build it today but its giving me following build errors.
1 Could not find schema information for the element 'supportedRuntime'.
2 Could not find schema information for the attribute 'version'.
3 Could not find schema information for the attribute 'sku'.
i tried few things but it is not working fine. I tried selecting the DotNetConfig.xsd from the properties of app.config. it didnt work. I chose some other schema then it is selecting both the schemas. and throwing some other bunch of errors too. I tried killing the process from the task manager. i tried replacing the app.config.
What should i do?
P.S: i am using visual studio 2010 version.
and .net framework 4.0
Close the solution, then re-load it and Rebuild
I'm working in Microsoft SQL Server Management Studio CLR registering .dlls into the database as assemblies. Right now, I'm registering Jayrock (Jayrock.dll, Jayrock.Json.dll) DLLs into the database. This is an ongoing project that has had a few people editing the database and SQL code. I dropped all of the assemblies and procedures that had been altered (and Unaltered) to start from square one. When I went to drop the assembly for "web" (code below)
CREATE ASSEMBLY Web
AUTHORIZATION dbo
FROM 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.dll'
WITH PERMISSION_SET = UNSAFE
GO
I got the error message:
DROP ASSEMBLY failed because the specified assemblies are referenced by assembly 'Jayrock.Json'.
I never had an assembly named Jayrock.Json and no one on my team created such an assembly. Attempting to drop it gets the error message from this question's title:
drop assembly Jayrock.Json
go
"DROP ASSEMBLY" does not allow specifying a schema name as a prefix to the assembly name.
I added ' ' and ( ) which still didn't allow me to drop this assembly. I have dropped ALL assemblies that were created but "Web" still won't drop. I'm not quite sure what I can do because creating the assembly I need to use Jayrock doesn't work because it is identical to the 'Jayrock.Json' assembly. There is some kind of bug in my code because I am getting exceptions from C# related to deserialization and missing assemblies that I can't debug if I can't get my assemblies added properly.
Run the following and look to see if you have an assembly named "Jayrock.Json".
SELECT * FROM Sys.Assemblies WHERE name like '%Json%'
If you do, like Martin Smith said in his comment, you need to put [] around the object name in the DROP statement.
I am updating our CruiseControl.NET continuous integration environment from using the old Visual Studio 2008 Web Deployment projects to Visual Studio 2010.
I do not want to use the Beta 2010 Web Deployment projects as I think I can make use of the updated Publishing/Packaging in 2010.
Currently I have managed to configure the CruiseControl script to call MSBuild twice. First to Build the solution in the Release configuration and then to Package the MVC project.
I then copy out the correct files from the Package from a hideous file path (which makes me suspect I am not doing this right but heh) and the Transformed web.configs to the Test server.
This is finally working but unlike when I used the 2008 Deployment Projects this code returns the ExecutingAssembly as App_web_xxxxx.dll and not Company.Product.Web.dll which is what I'm after.
Dim CurrentAssembly As Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly
Dim version As String = CurrentAssembly.GetName.Version.ToString
I know GetName returns the a longer string than just the name but I'm debugging it to see what it contains. I understand that is is the compiled/cached dll but why isn't it the one in the MVC bin.
Cheers
I figured this out - basically when I was calling Assembly.GetExecutingAssembly inside the footer.ascx. This meant that the code was in a dynamically compiled dll for the footer.
What I wanted was the DLL for the MVC website. So I used an extension property on the controller that set ViewStates with the Assembly information.
In my case I will want to use this code again so the extension property is in a different Assemmly that I can include in various MVC projects. This meant I had to change the code to use Assembly.GetCallingAssembly but it now works exactly how I wanted.
I have been messing around with writing some stored procedures in .NET code with SQL CLR Integration. In the stored procedure, I am calling a third-party dll. When I try to create the assembly in SQL Server containing my custom stored proc, it complains that the third-party dll is not registered with the database.
Is there some way I can call the dll without registering it in SQL Server?
No, you can't use an assembly that isn't in the Approved Assembly list, or that isn't registered in the database. You can't even load it into the GAC to access it, it has to explicitly be added to SQL Server using CREATE ASSEMBLY. Why don't you want to load the assembly into the database? What is it doing that you need in SQL? I ask because there may be a different solution to your problem that is a better fit.
The third party assembly must be pre-deployed to the server. Look at this link for instructions on deploying the assembly to the server.