VSIX extension for workflow - what type of Asset? - entity-framework

I'm working on a Visual Studio extension which will contain some workflows for database and code generation. One assembly named MyActivities contains some implementations of NativeActivity which are then used in XAML workflows like this:
<Sequence xmlns:my="clr-namespace:MyActivities;assembly=MyActivities">
<my:MyActivity CsdlInput="[Csdl]" SsdlOutput="[Ssdl]"/>
...
This is very similar to what the Entity Database Generation Power Pack does for Visual Studio 2010. However, our extension will be for VS2012.
Now I need a way to link this assembly to Visual Studio, so that it's available when the workflow executes. I tried creating a VSIX extension and adding the assembly as an Asset. I tried different Asset types, for example Assembly or MefComponent, but none worked. Visual Studio keeps telling me:
`Cannot create unknown type '{clr-namespace:MyActivities;assembly=MyActivities}MyActivity'.
What kind of Asset do I need to create a simple VSIX extension that installs my assembly so Visual Studio can use it?

I was able to achieve what I want:
In the project that uses the activity workflow, just add a reference to the assembly that contains the activity code (MyActivities in my case).
So maybe it's not necessary (or not possible) to create a VSIX extension that does what I want. But adding the reference is fine, too.

Related

Why can i not add nu-Get packages in visual studio for Unity project

Im creating a system in Unity that requires an API, i'm using visual studio to create my script. I have read instructions adding nu get packages. However i see a-lot of instructions where they add packages in reference however i do not have one. Im using a mac, so where can i find a reference file or do i need to make one.

package manager in visual studio code

I've been using visual studio code as a second display (with visual studio as the first) to view/edit code mostly JavaScript since you can right click/format the code with easy.
But I recently took to time to study how it's c#/asp.net core debug functionality has evolved and it seems it has become even more easier to start whipping debug in no time.
But there is one thing I haven't figured out and whether it's even possible. That's it managing nuget packages. Visual studio offers a nice package manager ui to view installed packages and which packages might need a version bump.
It's there an alternative for visual studio code other than browsing the nuget site and checking which of your referenced packages have updated and editing the .csproj manually or running dotnet add <project> package ...?
This is probably not relevant anymore, but for anyone else also searching for something like this, there is a pretty handy extension for VSCode called Package Manager GUI here.

Project referencing Portable Class Library gives error in Visual Studio Code

I create a console application in Visual Studio 2015 RC and add Automapper 3.3.1 using nuget to the project.
If I then add the following snippet to my project:
public class Class1
{
public void Test()
{
AutoMapper.Mapper.Map<B>(new A());
}
}
And then open the same project in Visual Studio Code preview on Windows 10 then I get a red squiggly on the Map function.
The error message says:
The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
My project is configured to use .NET 4.52 and there are absolutely no errors or warnings when building the same project using visual studio 2015 RC or using MSBuild from the command line.
Automapper is portable class library and this is what seems to trigger the problem.
Is this a known issue with Visual Studio Code or Omnisharp?
Are there any way to suppress these error messages?
Update:
I have now tested with VS Code version 0.3 and it is still not fixed.
To make it even simpler to reproduce I have also verified that the problem also exist for a ClassLibrary project containing only the 3 classes: Class1 as shown and class A and class B, which are just two dummy classes used to have something to map.
It does not matter which version of Visual Studio is used to create the project. The same problem exist if I create the class library project using VS 2013.
Maybe you added the reference in both dnx451 and dnxcore50 in project.json file.
I think the problem is Automapper did not support .NET Core 5.0, please refer this article for more detail about .NET core 5.0 and .NET framework 4.6.
http://blogs.msdn.com/b/cesardelatorre/archive/2014/11/18/what-is-net-core-5-and-asp-net-5-within-net-2015-preview.aspx.
This might be the limitation of multi-environment in .NET Core 5.0 when using available libraries. You should write by yourself or waiting for other libraries update if you want to use, otherwise, please remove dnxcore50 in project.json.
Happy coding!
This is actually a known issue with the OmniSharp-roslyn server which powers VS Code, see: https://github.com/OmniSharp/omnisharp-roslyn/issues/265
I suspect you might have better luck using the yeoman ASP.NET 5 generator to generate an ASP.NET 5 Console application.
See: http://docs.asp.net/en/latest/client-side/yeoman.html
And http://docs.asp.net/en/latest/dnx/console.html

TFSBranchToolVsExtension Exection of Action ConnectSourceControl Fails

I downloaded the TFSBranchTool VS Extension Project.
Rebuilt and Installed, but when I try to apply Initial Structure I get the following Error:
Exection Error:
Exection of Action 'ConnectSourceControl' Failed. Details: Could not load file or assembly Microsoft.AlLMRangers.BranchTool.SourceControlWrapper......
Any idea what might be causing the problem ? I tried on 2 different Servers! , I got the latest Update of VS2012.
I got VS2012 SDK installed and Vs2012 ObjectModel too, not sure what I'm missing!
We have posted an update to the sample code on http://vsarguidance.codeplex.com/releases/view/96222, which addresses this bug.
The issue was that Microsoft.ALMRangers.BranchTool.SourceControlWrapper.dll was missed in VSIX package. As action execution engine using MEF to load actions, it has no direct references to actions implementation assembly.
Vladimir from the team fixed the issue by specifying assembly as the MEF asset in the VS extension’s manifest file. Now it’s redistributed inside the extension package.
Can you verify that you have the file Microsoft.ALMRangers.BranchTool.SourceControlWrapper.dll
in the following folder:
%LOCALAPPDATA%\Microsoft\VisualStudio\11.0\Extensions\Microsoft. ALM Rangers\TfsBranchToolVSExtension\1.0
If its not there - try deleting the TfsBranchToolVSExtension and re-install the VSIX.

Windows Workflow 4 Designer error using custom activities with custom libraries

I built a custom activity referencing a custom library. When I drop my custom activity into a Windows Workflow 4 designer, I get this error:
Workflow Designer encountered problems with your document
Please check the document for invalid content, namespaces, references or reference loops
System.IO.FileNotFoundException: Could not load file or assembly 'my custom libary...'
I'm using Visual Studio 2010.
I've tried adding the library to the GAC, cleaning and rebuilding but still get the error. Any ideas? Thanks.
Be sure that the custom Library is added as a reference to your Rehosted editor. If not you can you can try is manually load your custom library assembly into the AppDomain.
AppDomain.CurrentDomain.Load(AssemblyLocation_you_pass_in);
Hope this helps.