Solidworks Plug-In recognized by Solidworks but doesn't display - c#

I have created a solidworks plugin and it works perfectly when I build and run on my computer but when I attempt to load it onto another computer with my installer, it fails to display. The plug-in is recognized and is displayed on the list of available plugins, but I am unable to load and use it. I am trying to build this for the 2022 version of solidworks.
I have attempted to look for the guid in solidworks add in folder and it is present.

Related

Getting error while loading Sqlite dll in Window 10 mahcine [duplicate]

I have a perfectly working windows forms C# .NET 4 application that uses a SQLite3 database file to store data and display forms.
When I deploy my app on any machine other then the dev machine, I get an exception thrown and it's message is "Could not load assembly System.Data.SQLite.dll or one of its dependencies. The specified module could not be found."
The System.Data.SQLite.dll reference in the project is set to Copy Local = True. Also, I tried manually loading the assembly with Assembly.LoadFile. The dll is placed in the output directory. I also tried setting the platform target to Any CPU as well as x86, no difference. All machines I am working with are 32-bit. What is the issue here? Why is my application trying to load the assembly and can't find it?
Thanks!
I had the same problem after publishing my program to a separate computer. Installing Microsoft Visual C++ 2010 Redistributable Package (x86) on the separate computer fixed the problem.
Note: the separate computer already had Microsoft Visual C++ 2010 Redistributable Package (x64) installed, the x86 version was needed.
'System.Data.SQLite.dll" requires "msvcr100.dll" which is one of it's Dependencies. This will be available only if you installed latest "Microsoft Visual C++ Redistributable" or any other product which internally provides this.
For example, VS2010 will install C++ Redistributable by default. Thats the reason your application doesnot works in some machine but works in others.
You could try pasting the "msvcr100.dll" in your application bin folder and distribute if you dont want to install VC++ 2010 Redist in all the PC's.
Some of the System.Data.Sqlite.dll modules depend on the "Microsoft Visual C++ 2012 Redistributable Package" .
You can find required dependencies on the official download page : http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
The answers already given didn't solve my problem. I tried to deploy to a VMware server. The solution that did help where given here: http://sqlite.1065341.n5.nabble.com/System-Data-SQLite-Deployment-Mystery-td71752.html Two methods are described there.
When i install this sqlite-netFx45-setup-bundle-x86-2012-1.0.88.0.exe, my app is able to find the right dll.
The second method is to add the dll to de app.exe.config in the debug or release dir. If you edit this file directly, there is a change VC will overwrite the file.
My main problem was that i installed the sqlite package manually. I didn't use NuGet, because i'm behind a proxy. If you do use Nuget, the information in the app.exe.config will be provided automatically.
Using NuGet behind a proxy is described here: NuGet Behind Proxy

How to include Visual C++ Redistribution with application

I've written a large C# 4.0 App in Visual Studio 2010. Some time ago I added the CEF framework (version 43.0.0.0) in order to utilize a web-browser inside my WinForms application.
If I run my app from Visual Studio, the browser runs correctly. However, upon using ClickOnce to deploy my app, it threw the following error: "Could not load file or assembly 'CefSharp.Core.dll' or one of its dependencies. The specified module could not be found." Although all the CEF files are present in the bin\Debug folder. In fact I found a page on GitHub listing which files are required, and a careful check verifies that all are present in the executable folder.
A list of required files can be found here:
One of the points made in the above article, are that the Visual C++ Redist files are required and asks in question 6. How do I include the Visual Studio C++ 2012/2013 redistributables on the target app?
It specifically states that CefSharp version 43.0.0 and below needs VC++ Version 2012. Therefore, I downloaded vcredist_x86.exe (the 2012 version)
I created a package.xml and product.xml Bootstrapper files in the Microsoft SDKs folder. I included these as a prerequisite in Visual Studio 2010's Publish screen.
However, upon a ClickOnce deployment and an attempt to launch the CEF Web Browser, it immediately throws the exception "Could not load file or assembly 'CefSharp.Core.dll' or one of its dependencies. The specified module could not be found."
I am at a loss as to what to do, in order to get the browser to work outside of my development environment, i.e., for the End-User to successfully use.
I've followed all the steps that I've found on line, both on Stackoverflow and Github for CefSharp. What else is required to get this working?
Please help!
I'm adding this addendum in case anyone working with CefSharp has run into the same issue, namely "Could not load file or assembly 'CefSharp.Core.dll' or one of its dependencies. The specified module could not be found.". It turned out to be a ClickOnce issue. ClickOnce included all the "managed" resources, but did not include the unmanaged ones, i.e., cef.pak, cef_100_percent.pak, d3dcompiler, libcef.dll, icudtl.dat, etc.
If I right-clicked on References and attempted to browse to these resources to add them, Visual Studio complained about them being unmanaged and would not allow them to be added.
After working with the Microsoft ClickOnce and Deployment forum, it was suggested that I right-click on the project, Add > Existing Item and add them. Then set their Build Action to "Content" and Copy to Output Directory to "Copy Always."
This allowed the resources to show up in Application Files... on the Publish tab. After another ClickOnce deployment, launching the Web browser was successful. No more complaints about missing files.

SSRS 2016 Custom Assembly Deployment Not Working

I have a very simple custom assembly written in C# using VS2017 that is being deployed to Microsoft SQL Server Reporting Services Version 13.0.4435.0 running with SQL Server 2016 (SP1-CU3) (KB4019916) on a Windows 10 box.
Below is the C# code for this "Hello World" custom assembly:
Namespace MyCustomAssembly
{
public class HellowWorldClass
{
public static string HellowWorld()
{
return "Hello World!";
}
}
}
Microsoft describes a step-by-step process for deploying a Custom Assembly:
https://learn.microsoft.com/en-us/sql/reporting-services/custom-assemblies/deploying-a-custom-assembly
Following the steps in the process, the first thing that I discovered is that the Report Designer default directory was different. After trying various folders, the destination that worked was the following:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\SSRS
After depositing the custom assembly DLL in this directory, the report preview worked as expected. This provided verification that the expression in the report textbox was defined correctly.
In accordance with the process, to deploy the custom assembly on the server the DLL should be placed in the following destination, adjusted for the specific SSRS version:
C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer\bin
The process then describes steps that extend the permissions of the custom assembly but this simple example should not require that. Execution permission should be sufficient. Therefore modification of rssrvpolicy.config should be unnecessary.
When I attempt to deploy the report to the serer by right clicking on the report in the Solution Explorer of VS2017 and selecting "Deploy", I get the following message (and only this text):
The definition of the report '/HelloWorldReport' is invalid.
If I remove the textbox containing the reference to the HelloWorld function in the custom assembly, the report deploys successfully to the server. So while there is no further information available in the message about why the report is invalid, it appears to be associated with the custom assembly on the server.
Here is what I have tried:
In spite of it not being required according to the process, I went ahead and edited rssrvpolicy.config to grant "FullTrust" to the assembly. Restarted the server.
I read that SSRS is based on .NET 3.5 (I built the assembly with 4.5.1) and that libraries needed to be built on .NET 3.5 to work. The custom assembly build was changed to use .NET 3.5.
Ensured that .NET 3.5 (and dependencies .NET 3.0 and 2.0) were installed on the server box. This was a long shot.
Reviewed various other tutorials and videos about the creation and deployment of custom assemblies. All seem to indicate that all that is necessary in this case is the placement of the DLL in the proper directory on the server.
Copied the custom assembly DLL in various other directories on the server. The thought was that if the VS2017 was in error maybe the server directory was also in error.
I looked into assembly security. Went through the signing process for the DLL. Used gacutil to install the custom assembly into the GAC.
In another desperate effort, I installed VS2017 community on the server and created a simple report and custom assembly on the server. Just as before, the VS2017 report preview presented itself correctly and the server deployment failed.
None of the above efforts worked.
I can share the RDL file or other material that might help identify the problem but I don't believe that the issue is with the report definition because the report will deploy if the references to the functions within the custom assembly are removed. And I don't believe that the issue is with the custom assembly because the preview works within the VS2017 environment. Is has to be something with the server but the error message is very opaque.
This is the first time that I have reached out to the SO community. I'm generally reserved and somewhat hesitant. Yet the experience of others has proven valuable to get by past development challenges and I am grateful. But I am really stumped this time. No one seems to have had this exact experience that I can find and I have searched exhaustively. I have little concern if the solution turns out to be a simple oversight or some basic ignorance that is worthy of ridicule. I just need a solution with what seems to be a non-problem for others.
Refer the following URL for solution:
https://developercommunity.visualstudio.com/content/problem/574712/rdl-deploy-error-vs-2017-ssrs-2017.html
Copy custom DLL to this folder C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\PrivateAssemblies on the developer machine.
One solution that worked is to use Report Manager to add the report rather than deploy from Visual Studio.
Just had the same problem as is described here.
For me the problem is that the DLL must be in two folders on the machine from where the report is being deployed:
For the DLL to work during development:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7
\IDE\CommonExtensions\Microsoft\SSRS
And to be able to deploy the report:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7
\IDE\PrivateAssemblies
Of course on the server the DLL must also be in the ReportServer\Bin folder
Also, I have seen posts about assembly having to be .NET 4.0, but this is not the case for me..... mine is 3.5

office vsto add in not loading on release

I have an office add-in (vsto) that has been working fine for ages.
It launches perfectly, runs nicely no problem, but this is only when debugging from visual studio.
If I now take the files from my bin\debug and move it to another folder, then I register the released version
c:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe "C:\Program Files (x86)\MyPlugin\MyVSTO.dll"
it registers correctly, but will not load in office.
I have tried retricking the registry setting "LoadBehavior" setting it back to 3, but no luck.
office keeps complaining about my add in with the error
"Not loaded. A runtime error occured during loading of a com add in"
So it seems like it is dying when trying to launch. I though there was a missing dll or something, but no such luck, every library i need is in the folder.
This is the exact same machine so shouldnt be a dot net issue
fyi
This is done in C# 4.0 using netOffice
You can not install an Excel add-in using REGASM because it does not setup all required information; you need to deploy your add-in as per MSDN office deployment guidelines, you have two choices:
Click once
Windows installer
Note: VS actually installs the Add-in for you by setting the right information In Excel and the registry, so that you do not need to deploy the add-in manually for every new build.

"Application requires that assembly *** be installed" error while trying to install my ClickOnce app

Here's an error I get when I try to install my application from the publish location:
I have my application (and a DLL used by it) linked to version 1.61.4111... of QWhale.Common which is a 3rd party DLL. I have been used this version since about 4 updates ago and never had this problem. I have no idea which part of my application or DLL could be trying to link to the older version. The only thing I did different on this version is that I moved my application's project folders to a new location in my computer.
Where should I start trying to find where this problem is coming from? Did you ever have this problem before?
As Yahia commented, this can be a licensing issue but if you've been using this assembly for a while and if you've been compiling it with your application, there is a chance that a setting associated with the file could have changed with your projects settings.
Assuming you are using Visual Studio, I recommend opening your Projects properties window and navigating to the Publish tab and opening the Application Files Dialog.
From there, find the referenced, 3rd party assemblies make try setting the Publish Status to Include and the DownloadGroup to (Required).
Save your changes and republish your application.

Categories

Resources