Solution : Predefined type 'System.Runtime.CompilerServices.IAsyncStateMachine' is not defined or imported

Hi all, When you try to create a simple .NET console application with a async method you might get the following error Predefined type 'System.Runtime.CompilerServices.IAsyncStateMachine' is not defined or imported This is because of targeting the wrong .NET framework version. For async to work out of the…

Read this article

Issue with compiling VS Package (with missing dependencies)

Hi all, Today i rather had a strange problem, where one of my Visual Studio package failed to compile with the following error 1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(761,5): error : CreatePkgDef : error : ReflectionTypeLoadException: Unable to load one or more…

Read this article

Class not registered error in examples shipped with Adobe SDK (9.1)

If you are interested only in the problem skip paragraph 1. Today I was eager to get start my next interesting task of developing a new secret Atmel Studio plugin that would render and show .pdf files from within the IDE in a tool window. For that I decided to…

Read this article

VSIX installation error .[PathConflictException: Another extension is already installed to the path that this extension is trying to install...]

One source of this error is when the Author field of the extension.vsixmanifest is left empty. To fix this please give valid author name in the vsixmanifest when developing the extension. It is also possible to extract the vsix and edit the extension.vsixmanifest and repackage it and then…

Read this article

ExecutingAssembly context while debugging managed code

I was recently debugging an issue with a computed path in managed code, The goal is to find a file in the path relative to the currently executing assembly. Every time i was debugging the issue and i inspect the Assembly.GetExecutingAssembly() when the first chance exception is caught in…

Read this article

Visual studio macro to refactor namespaces

was working on an rather assiduous task, to refactor the namespaces.  The history is something like this. 1. There is an sdk in which I refactored the namespaces. 2. There is an implementation of the sdk which I want to refactor. I was looking into a set of tools to…

Read this article

The "Exec" task needs a command to execute.

When I built my Visual Studio 2010, based project I got the above error without any clue. Then I realized that the Exec task is a MSBuild task that is trying to execute something and that something is NullorEmpty. When I inspect the Post build settings of the project, there…

Read this article

Error in Visual Studio : No VisualStudio Registration Attribute found in this assembly

This error happens when you create a project of type “Visual studio package” (or any Extensibility project) from Visual Studio 2010 and then you remove the file Package.cs from the project for some reason. TO fix please open the project file manually and remove the entry.1. <Import…

Read this article

How to register your .NET assembly in GAC and make it show in Add Reference Dialog

When you are creating a deployment package, that ships .NET assemblies as part of it, you need to be aware of two things when installing them. 1. Register in GAC, so that the .NET Runtime will be able to find and load that assembly. This can be done by running…

Read this article

Assembly References not resolved in .NET

Problem : Today I was working on an interesting problem in .NET, where a reference to an assembly is resolved physically, but then it is not included when MS Build tries to lookup types in that assembly.  Reason : Though a reference assembly is physically resolved there seems to be certain…

Read this article