I'm trying to build a portable library project on a TFS server and I've got the following error:
"The imported project "C:\Program Files (x86)\MSBuild\Microsoft\Portable\v4.6\Microsoft.Portable.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk"
It's true, I don't have a Portable directory in MSBuild/Microsoft on the server. I have it on my developer computer, so I guess if I install Visual Studio it will work but I don't want to. I've installed the build tools on the server, with all the available UWP features but I still don't have this Portable directory.
In general, your build server should consist of the same software configuration as a developer workstation. Install Visual Studio. It does not consume a license.
Just copy C:\Program Files (x86)\MSBuild\Microsoft\Portable folder to your build server. It's pity that build tools 2017 don't create these files automatically.
Have you tried to install just .NET Framework Developer Pack 4.6.2, the Build tools essentials from here, and PortableLibraryTools with /buildmachine switch?
Related
I'm having a problem adding a custom SSIS component to SSIS in Visual Studio 2015.
My system is:
Windows 8.1 64 bit
Visual Studio Community 2015 Version
14.0.24720.00 Update 1
Microsoft SQL Server Integration Services Designer
Version 13.0.900.80
(I've installed the SQL Server 2016 CTP3.2 so the version of SSIS is this version - this may be part of the problem and it isn't a fully released product and this may be a bug)
Microsoft .NET Framework
Version 4.6.01055
I've tried using assemblies from 110 and 120. I've added both dll's to the GAC, put them in the x86 and x64 folders (see below) with different strongly signed names.
110 assemblies
c:\Program Files (x86)\Microsoft SQL Server\110\DTS\PipelineComponents c:\Program Files\Microsoft SQL Server\110\DTS\PipelineComponents
120 assemblies
c:\Program Files (x86)\Microsoft SQL Server\120\DTS\PipelineComponents c:\Program Files\Microsoft SQL Server\120\DTS\PipelineComponents
I've researched this, but can't find any definitive answers to problems. People seem to ask questions, get some responses, and then there is no response telling anyone how to solve this problem as in the following post.
Visual Studio 2015 Integration Services project does not pick up my custom SSIS component
The only difference from the original post is that I'm using SQL Server Data Tools Preview (December) for Visual Studio 2015, but that shouldn't matter should it?
I've tried changing the assemblies referenced in the project. After trying my own code I found the following page that describes how to start building a custom SSIS component and without doing to much work build it, add the dll to the GAC and to the appropriate DTS folder.
Developing a Custom SSIS Source Component
What would be really useful would be to develop an installer that picks up the system settings, installs to the GAC, and copies the dll to the correct folder for it to be picked up by the SSIS Toolbox. It's almost as if Microsoft want to make it as hard as possible to create and install new SSIS components.
So questions that I have:
1. What version of .NET should I be using for an SSIS component in Visual Studio 2015?
2. What version of the gacutil should I be using (I've heard this matters)?
3. What folder does the dll need to be put into to be picked up by the SSIS toolbox.
4. Should I put the dll in the x86 or x64 folder? My system is x64, but the Visual Studio exe is an x86 executable so I'm guessing the x86 folder is the correct one.
5. Does it matter if I put the dll in multiple folders?
5. Has anyone actually managed to add a custom SSIS component in Visual Studio 2015?
Any help or comments would be much appreciated.
Matt
OP's Comment, converted to answer:
Ok, I've finally managed to work this one out:
I used the .NET Framework 4.6. I made sure that I added to the gac using the gacutil.exe in the following folder: C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools and I copied the dll to the following folder: C:\Program Files (x86)\Microsoft SQL Server\130\DTS\PipelineComponents
After refreshing the SSIS toolbox the component now appears in the Common folder/subsection.
I hope this helps anyone else who has had this problem.
– mattp Jan 31 '16 at 2:14
I have created setup project in VS2013 in the prerequisite section i have all the component related to 4.5 framework (lowest is 3.5 framework). One of my component needs C++ 2005 redistrbutable is there any way by which i can add it in prerequisite section
You can manually add the merge module from the windows sdk on the development machine.
Path would be C:\Program Files (x86)\Common Files\Merge Modules
Also you can deploy the couple of dlls of VC redist manually in your own installer (in local directory), please see link below.
https://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx
Side by side assemblies location.
C:\Windows\winsxs
What I'm trying to do
I currently have a project file that contains a single EF 5 Model with the .edmx configured to embed the metadata into the output assembly.
If I run a local package via Visual Studio 2012, the produced assemblies contain the correct resources. Manually running package through MSBuild also correctly embeds the resources in the assembly:
msbuild web.csproj /t:Package /p:Configuration=Release
When I manually inspect the assembly generated by Visual Studio or by the MSBuild package step with dotPeek, I can confirm that the package contains the .csdl, .ssdl and .msl resources.
The actual problem
I have on hand a build server that is running Microsoft Windows Server 2012 and Visual Studio 2012. If I manually run MSBuild via the Visual Studio 2012 Command Prompt, using the same exact command line as above, then an assembly is generated that does not contain the resources embedded.
Why are my EF metadata files not being embedded when I perform automated packages via MSBuild?
Simple Self Contained Correct Example
A SSCCE which demonstrates the workaround may be found here. The example contains the exact steps required to reproduce the error in the readme.txt.
Using your example, on Windows 8 + VS2012 installed, I was able to generate package using Package.bat and all generated assemblies are contain the all EF metadata files.
In the Readme.txt you are mention the MSDeploy
4) Run MSDeploy /t:package on the project
From your question looks like you have issues with MSBuild.
Could you verify that you don't have old TestEntityEdmx.Hackaround.dll sitting in the TestEntityEdmx\obj\Release... folder when you run build.
we recently began to use Team Foundation Build Server 11 Beta with a build agent on a Windows Server 2008 R2 system without having Visual Studio installed on this system. Everything works fine.
When including new Visual Studio 11 Beta Portable Libraries in our solution, problems started.
MSBuild was not able to find included
C:\Program Files (x86)\MSBuild\Microsoft\Portable\v4.0\Microsoft.Portable.CSharp.targets
on the build agent system.
We copied the missing files from a second system but now we get a build error
".NETPortable,Version=v4.0,Profile=Profile47" not found.
How to build Portable Library on Team Foundation Build 11?
Best regards,
Björn
http://msdn.microsoft.com/en-us/library/gg597391.aspx
To install the Portable Class Library Tools on a build machine without
installing Visual Studio 2010, save the download file
(PortableLibraryTools.exe) on your computer, and run the installation
program from a Command Prompt window. Include the /buildmachine switch
on the command line.
I want to write to visual studio output window in my add in. I found a code from
How do I write to the Visual Studio Output Window in My Custom Tool?
But I can't add a reference to IVsOutputWindow.
There is no any namespace like Microsoft.VisualStudio.Shell.Interop
and also no dll. How should I fix this problem
Thank you.
It sounds like you're having trouble locating the IVsOutputWindow interface. If so here is the information on that type
Namespace: Microsoft.VisualStudio.Shell.Interop
DLL: Microsoft.VisualStudio.Shell.Interop
If the SDK is install on your machine the DLL will be located in the following directory
C:\Program Files (x86)\Microsoft Visual Studio 2010 SDK\VisualStudioIntegration\Common\Assemblies\v2.0\Microsoft.VisualStudio.Shell.Interop.dll
The top 2 directories may change though based on the operating system and version of the SDK you are using. If this doesn't work please let me know the SDK version you are using and I'll try and point you to the correct path.
I found that I had to actually download and install the Visual Studio SDK - it's a separate download that's not included with Visual Studio itself. Once installed, I restarted Visual Studio, and the necessary assemblies were listed when I went to add references to my project.