Building VSIX project in Release does not create a VSIX file anymore, just a DLL - dll

I think the title is pretty clear. I always build in Release mode and upload the created VSIX file to the VS Marketplace.
Since today, it just creates a .dll file when I build in Release mode, no VSIX is generated. Also,in Debug I cannot set break points anymore, symbols won't load.
After reverting the commit (5 lines of code) to the previous version the problem still occurs.
I have no idea what could have caused this. Anyone experienced this before and what can I try to resolve this?
Edit:
This shows up in the build log, can this be the cause?
warning CS1762: A reference was created to embedded interop assembly 'EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' because of an indirect reference to that assembly created by assembly 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Consider changing the 'Embed Interop Types' property on either assembly
When I set the Embed Interop Types property to true on the EnvDTE assembly I get service can not be embedded errors throughout the package code.
I tried creating new VSIX projects or opening older ones, no issues there, it creates a .VSIX file when building in release mode. Comparing the CSPROJ files and configuration shows no difference.

Related

System.Management.dll not being copied to output directory .net 6 c#

There is an error System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.'.I figured when the System.Management.dll is in the output directory, the error will be gone.
It is reference using NuGet but I couldn't get libraries in NuGet to be copied to the output folder. So I thought of adding the physical System.Management.dll file into my project and and reference it as assemblies (right-click project -> Add Reference -> browse to library) thenset 'Copy Local' to True. However, the dll still won't get copied over to the output folder.
The application is on .Net 6. Is there a reason behind why I can't copy this library like other?
A .NET6 project would normally use System.Management version 6.0.0.
The error suggests that there is another package in your project that explicitly depends on 4.0.0.
Without knowing the specifics of you projects, I suggest:
inspecting the build output for warnings about package version,
upgrading 3rd party packages in your solution.
Figured out I could copy nuget package references to output directory by setting this attribute in the project file
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
Then the nuget referenced packages will be copied to the output directory.

Error loading a 3.0 framework dll Unity

I am trying to load a managed dll into my project. C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\System.ServiceModel.dll
Its an Empty project. I paste this dll into my Asset/Plugin folder. I compile for Windows8 (Universal App)anyway it fails with all SO. I change API Compatibilty level to 2.0. It seems its load without problem. As soon as I play Unity the following mistake appears:
SpritePacker failed to get types from System.ServiceModel,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxx.
Error: The classes in the module cannot be loaded.
UnityEditor.Sprites.Packer:GetSelectedPolicyId()
Somebody with this problem?
Finally it worked out loading the dll from:
"C:\Program Files (x86)\Unity\Editor\Data\MonoBleedingEdge\lib\mono\gac\System.ServiceModel\3.0.0.0__b77a5c561934e089"
Other dlls where not valid. The reason why it is like this I do not know it.

How do I use COM reference within SSIS package?

I'm trying to use the Microsoft Shell Controls And Automation COM object library (C:\Windows\System32\shell32.dll) from within an SSIS Script Task to manipulate .zip archives.
Unfortunately, although I have successfully added the relevant Reference and the Script Task compiles OK. I'm using VB.NET, for what it's worth. I get the following runtime error as soon as I try to create any objects defined within the library:
Error: 0x1 at Archive File: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Interop.Shell32, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'Interop.Shell32, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
at ST_a2650b7f39504eaa8c80e37a6736d957.vbproj.ScriptMain.Main()
I thought the Interop DLL would all be taken care of for me - does anyone know what step am I missing?
SSIS needs all .dll references to be registered with the GAC, you are correct.
You have different options regarding installing this dll into the GAC:
Drag and drop the .dll into the %windir%\assembly\ folder.
Use the gacutil.exe you are thinking about using: Regarding installing into the GAC using the gacutil, there is alot of useful information here: Global_Assembly_Cache. Basically, if you have the .NET framework installed (you are using VB.NET so no problem there), you will have a gacutil.exe in your Microsoft.NET folder.
(What I normally use when all else fails) Create a windows MSI project in Visual Studio that automatically does all this for you, useful info here: How to install assembly in the GAC using MSI
If you install that .dll in the GAC and you are still having problems, another option is to actually create a separate visual studio project that contains your logic for manipulating the needed zip files build it and call its exe from SSIS using the Execute Process Task. You can pass arguments specified in the SSIS package. Not very elegant, but it gets the job done if you are keen on using SSIS.
UPDATE:
The solution in this question did the trick SSIS Script Task COMException / FileNotFoundException error. The problem was in adding a signed reference of the dll, this answer provides a good step-by-step workaround for adding a COM reference within the SSIS Script Task.

Could not load file or assembly 'Microsoft.Web.Design.Server

Help please, I am having an error on the TFS. it complains that it cannot load the assembly below.
the project works fine on my computer. I searched for the dll by there is no such dll called: Microsoft.Web.Design.Server.
Any help pelase?
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Web.Design.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
The build server does not have the same software installed as your local machine. Thus when it goes to resolve dependencies it cannot find them.
This is compounded when your project has GAC references.
I recommend that anything which isn't a system assembly be copied to a folder and put into source control. The projects should then reference this assembly as a file reference instead of a GAC reference.
Since the file is now in source control it'll be available to the build server for it to resolve the assembly at compile time.

Mono - Could not load file or assembly

i just exported my project to my new imac an loaded my solution into monodevelop.
After the successfully compilation i started the project, and i always getting the same error.
** (/Library/Frameworks/Mono.framework/Versions/2.6.1/lib/mono/2.0/xsp2.exe:1576): WARNING **: The following assembly referenced from /private/var/folders/9y/9ypfv24bEwieHw+Yy+PUsU+++TI/-Tmp-/nhu-temp-aspnet-0/ebc9e2c6/assembly/shadow/7f5f6265/859daf16_fac2cd73_00000001/Centrism.Administration.UI.dll could not be loaded:
Assembly: Centrism.Core (assemblyref_index=3)
Version: 0.0.3688.40278
Public Key: (none)
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/var/folders/9y/9ypfv24bEwieHw+Yy+PUsU+++TI/-Tmp-/nhu-temp-aspnet-0/ebc9e2c6/assembly/shadow/7f5f6265/859daf16_fac2cd73_00000001/).
** (/Library/Frameworks/Mono.framework/Versions/2.6.1/lib/mono/2.0/xsp2.exe:1576): WARNING **: Could not load file or assembly 'Centrism.Core, Version=0.0.3688.40278, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
In other projects the assembly works correct and can be loaded.
I had the same problem with a dll that was in the same path as the application assembly, the problem was that the dll name had a different case than the expected one. So the Abc.dll was missing, in the folder it was named abc.dll, after renaming, it worked.
I guess I'm going to ask the obvious:
Do you have Centrism.Core.dll somewhere that Mono knows about and can get to?
If your project is referencing the Centrism.Administration.UI.dll, and it is not in the GAC on your iMac, the easiest solution would probably be to set the reference to that assembly to "Local Copy". For web projects, this will copy the assembly into the application's Bin directory, where xsp should be able to pick it up.
I had this error when adding a new assembly to an existing project (which itself was referenced by a unit test project).
Because the assembly wasn't included in both projects, the unit test would error out. The solution was to add a Copy tag to the project file:
<Copy SourceFiles="$(ProjectDir)\dlls\NewAssembly.dll" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true" />
Presumably it would also work to add the reference directly to the unit test (this reference is not used directly, so was able to avoid using above).