Quantcast
Channel: MSBuild forum
Viewing all 2763 articles
Browse latest View live

Copy and CopîedFiles Output

$
0
0

Hi all,

I facing a trouble and wondering what I did wrong.
My purpose is to compare CurrentBuild to LastBuild content. Copy all modified files in CurrentBuild, and put in a Delta folder only modified files.
To do so I use a copy task from CurrentBuild to LastBuild and skip changes. This works fine until here.
I take the Output CopiedFiles as SourceFile of a second copy task to the Delta folder.
My problem is the Output CopiedFiles returns ITaskItems with filename only, without the file path...

C:\Test\
======
C:\Test\CurrentBuild\
C:\Test\Delta\
C:\Test\LastBuild\

CurrentBuild C:\Test\CurrentBuild\: 
=========================
C:\Test\CurrentBuild\1\file1.txt
C:\Test\CurrentBuild\2\file2.txt
C:\Test\CurrentBuild\3\file3.txt
C:\Test\CurrentBuild\file0.txt

LastBuild C:\Test\LastBuild\: 
====================
C:\Test\LastBuild\1\file1.txt
C:\Test\LastBuild\2\file2.txt
C:\Test\LastBuild\lastbuildcontenttodelete.txt


Delta : C:\Test\Delta : Empty
====================

 
<!-- Copy Output to LastBuild--> 
 
<Copy SourceFiles="@(CurrentBuildFiles)" DestinationFiles="@(CurrentBuildFiles->'$(LastBuildFolder)%(RecursiveDir)%(Filename)%(Extension)')"  SkipUnchangedFiles="true" >    
  <Output TaskParameter ="CopiedFiles" ItemName="ModifiedFiles"/>     
</Copy>    
 
 <!-- End Copy Output to LastBuild-->   
 
      Task "Copy" 
        Did not copy from file "C:\Test\CurrentBuild\1\file1.txt" to file "C:\Test\LastBuild\1\file1.txt" because the "SkipUnchangedFiles" parameter was set to "true" in the project and the files' sizes and timestamps match.  
        Did not copy from file "C:\Test\CurrentBuild\2\file2.txt" to file "C:\Test\LastBuild\2\file2.txt" because the "SkipUnchangedFiles" parameter was set to "true" in the project and the files' sizes and timestamps match.  
        Creating directory "C:\Test\LastBuild\3".  
        Copying file from "C:\Test\CurrentBuild\3\file3.txt" to "C:\Test\LastBuild\3\file3.txt".  
        Command:  
        copy /y "C:\Test\CurrentBuild\3\file3.txt" "C:\Test\LastBuild\3\file3.txt" 
        Copying file from "C:\Test\CurrentBuild\file0.txt" to "C:\Test\LastBuild\file0.txt".  
        Command:  
        copy /y "C:\Test\CurrentBuild\file0.txt" "C:\Test\LastBuild\file0.txt" 
      Done executing task "Copy".  
 

LastBuild C:\Test\LastBuild\: 
====================
C:\Test\LastBuild\1\file1.txt
C:\Test\LastBuild\2\file2.txt
C:\Test\LastBuild\lastbuildcontenttodelete.txt
C:\Test\LastBuild\3\file3.txt
C:\Test\LastBuild\file0.txt


I used a WriteLinesToFile task to get ModifiedFiles...
I get all files as @(CurrentBuildFiles) but it's perhaps because file where considered as copied...

<Copy  
        SourceFiles="@(ModifiedFiles)" 
        DestinationFiles="@(ModifiedFiles->'$(Delta)%(RecursiveDir)%(Filename)%(Extension)')">  
    <Output TaskParameter="CopiedFiles" ItemName="ModifiedFiles2"/>  
</Copy> 

Everything comes 'flatly' in C:\Test\Delta\ 
Delta : C:\Test\Delta :
====================
C:\Test\Delta\file1.txt
C:\Test\Delta\file2.txt
C:\Test\Delta\file3.txt
C:\Test\Delta\file0.txt

What I expected  : 
Delta : C:\Test\Delta :
====================
C:\Test\Delta\3\file3.txt
C:\Test\Delta\file0.txt

I expect at least the tree structure : 
Delta C:\Test\Delta\:
====================
C:\Test\Delta\1\file1.txt
C:\Test\Delta\2\file2.txt
C:\Test\Delta\3\file3.txt
C:\Test\Delta\file0.txt


Do you have my idea ?
What did I wrong ?

Thanks for your answer, I'm lost.

Best regards
Eric


An error occurred while the program was compiled

$
0
0

An error occurred while the program was compiled 

------

The item "obj\Debug\Supoin.TaskManage.App.FrmTaskManage.resources" was specified more than once in the "Resources" parameter.  Duplicate items are not supported by the "Resources" parameter.

---------vs 2008 / windows 7

VS 2015 C#-based solution with Linker failure

$
0
0

I'm porting an existing VS 2013-based solution to VS 2015 Update 1 and I am receiving an error code:

The following is a post-build command that triggers the error:

"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\al.exe" /out:"C:\p4\MMM-2015\blah\tm1\Assemblies\USSAdmin.resources.dll" /culture:en /embed:"C:\p4\MMM-2015\blah\tm1\blah\USSAdmin\USSAdmin.resources"  /t:lib

I'm getting an error: exited with code -1073741819 with some Linker error dialogs also.

The above command works fine in a command-prompt.


Error: Unable to find manifest signing certificate in the certificate store.

$
0
0

Hello,

So, basically, I rebuilt my project (from the build menu) and I had some trouble with the WMPLib, which I fixed since I was used to it, however, right after, I got the following error:

SeverityCodeDescription
ErrorUnable to find manifest signing certificate in the certificate store.

How do I fix this and what is it in the first place?

MSBuild not copying indirectly referenced dll on build server

$
0
0

Hi,

I have 2 Projects, Proejct X and Project Y

Proejct X references Project Y. Project Y intrun referes the dll Microsoft.Office.Interop.Excel which is in a "MyLib" folder. If have set CopyLocal=True on both the projects. The dll Microsoft.Office.Interop.Excel is also present in the GAC.

The csproj file also shows the tag '<Private>True</Private>' in the project file for both the proejcts X and Y.

Now when i build the solution using visual studio locally the Bin folder for Project X shows 3 dlls as desired, X.dll, Y.dll and Microsoft.Office.Interop.Excel.

Now when i build the solution using MSBuild locally the Bin folder for Project X shows 3 dlls as desired, X.dll, Y.dll and Microsoft.Office.Interop.Excel.

But when the same thimng goes on the TeamCity build server, i dont see Microsoft.Office.Interop.Excel.dll. It is never copied to the Bin folder of project X. The task '_CopyFilesMarkedCopyLocal' never copies the dll.

Any suggestions?

Thanks in advance 

Prayag

VS2015 busted abfter update1

$
0
0

I didn't use VS for a while, and I had an old project that worked for ages. Recently I installed update1 and it seems that all my VS install got busted. Note that I didn't install anything else, I didn't modify anything else, simply installed update1.

Now, from cmd.exe:

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86

cl test.cpp

 and I get "LINK : fatal error LNK1104: cannot open file 'libucrt.lib'"

Congratulations microsoft. How's that even possible somebody broke it that badly?!?

In installed programs I have:

WDK 10.0.10586.0

Could it be that the wdk doesn't come with ucrt (includes and libs) and vcvarsall.bat picks up installation that doesn't have ucrt???



// test.cpp
#include <stdio.h>
int main() { printf("hello"); }






Building .dwproj and not getting any compilation messages

$
0
0

We are automating the build of our Analysis Services projects using the following devenv command line (from MSBuild):

"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" "D:\Builds\Path\Project.dwproj" /ReBuild Development /ProjectConfig Development /out devenv.log

However, this is only producing the following output in devenv.log and the developers don’t see the reason for their build failure:

        Microsoft Visual Studio 2013 Version 12.0.40629.0.

         Copyright (C) Microsoft Corp. All rights reserved.

         ------ Rebuild All started: Project: Project, Configuration: Development ------

         ========== Rebuild All: 0 succeeded,1 failed, 0 skipped ==========

The error messages from Visual Studio are not getting included in the devenv.log.

This approach works for other types of Visual Studio project and produces compilation error message – just not for .dwproj project files.

Any suggestions?

Paul

Product license Information

Microsoft Visual Studio Ultimate 2013

Version 12.0.40629.00 Update 5

Microsoft .NET Framework

Version 4.5.50938

Installed Version: Ultimate

Architecture and Modeling Tools   06181-004-0451013-02939

Microsoft Architecture and Modeling Tools

   

UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

LightSwitch for Visual Studio 2013   06181-004-0451013-02939

Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013   06181-004-0451013-02939

Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06181-004-0451013-02939

Microsoft Visual Basic 2013

Visual C# 2013   06181-004-0451013-02939

Microsoft Visual C# 2013

Visual C++ 2013   06181-004-0451013-02939

Microsoft Visual C++ 2013

Visual F# 2013   06181-004-0451013-02939

Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06181-004-0451013-02939

Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Application Insights Tools for Visual Studio Package   1.0

Application Insights Tools for Visual Studio

ASP.NET and Web Tools   12.5.60612.0

Microsoft Web Developer Tools contains the following components:

Support for creating and opening ASP.NET web projects

Browser Link: A communication channel between Visual Studio and browsers

Editor extensions for HTML, CSS, and JavaScript

Page Inspector: Inspection tool for ASP.NET web projects

Scaffolding: A framework for building and running code generators

Server Explorer extensions for Microsoft Azure Web Apps

Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0

For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.30612.0

For additional information, visit http://www.asp.net/

Common Azure Tools   1.4

Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Microsoft Azure Mobile Services Tools   1.4

Microsoft Azure Mobile Services Tools

Microsoft Dynamics AX Application Explorer   6.3.1000.309

Microsoft Dynamics AX Application Explorer

Microsoft Dynamics AX Project Integration    6.3.1000.309

Microsoft Dynamics AX Project Integration

Microsoft Dynamics AX Visual Studio Tools   6.3.1000.309

Microsoft Dynamics AX Visual Studio Tools

NuGet Package Manager   2.8.60610.756

NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2013 ENU   12.0.30626

Microsoft Office Developer Tools for Visual Studio 2013 ENU

PreEmptive Analytics Visualizer   1.2

Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Analysis Services  

Microsoft SQL Server Analysis Services Designer

Version 12.0.2000.8

SQL Server Data Tools   12.0.41012.0

Microsoft SQL Server Data Tools

SQL Server Integration Services  

Microsoft SQL Server Integration Services Designer

Version 12.0.2430.0

SQL Server Reporting Services  

Microsoft SQL Server Reporting Services Designers

Version 12.0.2430.0

Windows Phone 8.1 SDK Integration   1.0

This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0

This package contains the necessary Visual Studio integration components for Workflow Manager.

Missing Relase option in One WEB Project but shows in another

$
0
0

Thanks in advance,

Question:

I have to publish the website , in one of the web form project if I am publishing with debug mode its publishing with source code files as well, while in other web form project if I publish by choosing release mode (which is not available in 1st project) it publish's without source forms which is correct and I want, My question is why in one project Release build option is missing , while it comes with other.

Tools : Visual Studio community edition 2015 update 2.


Build/Publish errors due to 'using static '

$
0
0

Hi all,

We have part of a web app that is deployed/published as part of our CI post build script.  The project builds and deploys properly or as desired through DEVENV, but fails from the script using msbuild.  When Dev removes the 'static' from using it appears OK.

Does anyone know how to get around this.  Is there a parameter that can be passed to handle 'usingstatic'?

We're using VS 2015 by the way.

Thanks for any help!

ALINK: error AL1047: Access denied

$
0
0

I want to build my project, but always get the error:

ALINK : error AL1047: error importing file d:\[...]\obj\x86\Debug\project.exe -- Access denied .

(original: ALINK : error AL1047: Fehler beim Importieren der Datei d:\[...]\obj\x86\Debug\project.exe -- Zugriff verweigert .)

This is really weird and seems to be related to a combobox I'm using. When I delete the lines where I call comboBoxCompanyInfo.SelectedIndex everything works fine.........
When I switch to Release the project also gets compiled.

Do you have any advice for me?


ALINK : error AL1047: Error importing file

$
0
0
Dear Sir,

due to abnormal shutdown of system, i am getting the error while compiling the project it says File importing error due to uncorrect format

kindly help me regarding this issue, i will be thankful to you

the complete error is below


C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\AL.exe /culture:ar /out:obj\Debug\ar\PayrollMgm.resources.dll /template:obj\Debug\PayrollMgm.exe /embed:obj\Debug\PayrollMgm.FrmCoWizard.ar.resources

ALINK : error AL1047: Error importing file 'i:\PayrollMgm\PayrollMgm\obj\Debug\PayrollMgm.exe' -- An attempt was made to load a program with an incorrect format.

Done building project "PayrollMgm.csproj" -- FAILED.

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Regards,

Imran Ghanchi

MSBuild newbie questions - extension pack, paths for building, source checkout etc outside of solution directory

$
0
0

Ive never much time writing msbuild scripts until recently.  Now I want a script to automate some of the same steps im using in VS2015 to build and publish a web project to a web server using just the file system.  I have VS publish profiles and they work, but I want to build & deploy using a command line, then run this build script remotely via powershell on a separate machine.

First things first...

Im going through an example and discovered the msbuild extension pack (didnt know it existed).
https://app.pluralsight.com/library/courses/msbuild/table-of-contents
http://www.msbuildextensionpack.com/

The example used an import statement to pull in the extension pack
<Import Project="C:\Program Files\MSBuild\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks"/>

Well, MSBuild (the runtime) is located in the .NET framework folders, both the 32 & 64 bit versions
There is also an MSBuild folder in both of the "Program Files" folders (32 & 64 bit).  What is this?  It looks like Visual Studio related items?

Questions:
(1) What are these folders in the "Program Files" folder(s) and how are they used by MSBuild ?
(2) Where do I unzip this extension pack or does it really matter? 
(3) The example references the solution from the same directory as the build script, but I want to keep my build script(s) separate from the code they build.  Can someone provide some examples or links to using msbuild where the scripts are separatefrom the code (not part of the solution or in the same folder)?

Im thinking I just need to create a folder where all the source gets pulled down into (eg.  E:\builds) - this way my build script can point to this folder.

The basic tasks Im going to do are

<!-- Clean build dir -->

<!-- SVN checkout to build dir -->

<!-- Build solution -->

<!-- Deploy solution -->


I found my answer for (1) & (2) here, but still wondering about (3)
https://msdn.microsoft.com/en-us/library/ms164309.aspx?f=255&MSPPError=-2147217396


Invalid Handle Visual Studio 2008 / Windows 7

$
0
0

Hello Team,

We have a home made application, using Visual Studio 2008, this application send labels to zebra printer.

With windows XP it's working great, but something is happened with Windows 7

We receive this error message:

x = New Microsoft.Win32.SafeHandles.SafeFileHandle(hPortP, True)
           outFile = New FileStream(x, FileAccess.ReadWrite) 'Create FileStream using Handle 

Regards

Building C++ projects using MinGW

$
0
0

Hi,

I'm looking for the best way/plugin to be able to generate x86 and x64 architectures code from standard C++ language (not VC++). I have found VisualGDB but I'd prefer a professional advice.

Thanks! 

Treating warnings from custom build steps as warnings

$
0
0

As part of our build, we have one project (.vcxproj) which contains just one python script withCustom Build Tool building, command line: $(python_bin)/python.exe %(FullPath). Msbuild is able to parse warnings from this python script and display them after build:

"F:\Generators.vcxproj"(default target)(1)->(CustomBuild target)->
  F:\Tool.py(274): warning : OPSEC [F:\Generators.vcxproj]
  F:\Tool.py(274): warning : OPSEC [F:\Generators.vcxproj]2Warning(s)0Error(s)

now, how can I force it to treat those warnings as errors? Only option I found isTreat Linker Warning As Errors, which obviously didn't help since linking on this project is not done (since it's just one .py file with custom build) and anyway those warning are from build step.

I even tried adding <TreatWarningAsError>true</TreatWarningAsError> intoClCompile section. Didn't help.

How can I force msbuild to treat those warnings as errors?


Build Configuration in "Preprocessor"

$
0
0
Hello,

C# automatically creates a variable to tell if the code is being built in release or debug from within a "Preprocessor" directive.  Is there a similar variable defined for the build configuration (ie. Win32, x64, ...)?

Thanks.

Publishing a C# program revision with a DB

$
0
0

I have created a C# program in VS2013. it is mostly complete, as with all programs it still needs some tweaking. The program also uses an Access DB.

Therein lies the problem. On the publish page in “Application Files” I have changed the Publish Status to “Data File”. The other files are still set to “Include (Auto)”. This cured the problem with the program finding the DB

If I uninstall the program and reinstall everything works. Now the RUB.

If I install over the top of the existing program, I get many errors.

Can someone explain the full process to do this properly and have the program work?

Jay

Problems with VSHOST.EXE

$
0
0
Hi all,

I've started getting errors when building an application.  It stop building with an "This operation could not be completed" error.  If I try again, it then says "Visual Studio could not copy a support file to this location <path to VSHOST.EXE>".

I can fix the error by renaming VSHOST.EXE to VSHOST.EXE.OLD and rebuilding. 

The project is on a network share so perhaps this could be the problem

Current autoexec.bat method

$
0
0

Been away from PCs and coding for quite some time. Presently, I can use such as VS 2015, VB, and create a WPF, "HelloWorld" file. I can release it in the form of an executable file, HelloWorld.exe, and works fine. I can move the file to a web host server and then anyone can type such as myhostname.com/HelloWorld.exe and the file runs OK.

I would like to know how to do the equivalent of the older DOS, autoexec.bat, but not in desktop or other startup. How can I get HelloWorld.exe to open any time that anyone opens myhostname.com and without typing /HelloWorld.exe? Presently anyone can enter my site and then click on HelloWorld.exe or they can specify HelloWorld.exe as part of the address only.

thanks

Could not find type xxx

$
0
0

I have recently upgraded from Visual Studio 2013 to VS 2015. After the conversion a control can not be found. I get the error:

Could not find type 'FTP_ProgressBar.FtpProgress'. Please
make sure that the assembly that contains this type is referenced. If
this type is a part of your development project, make sure that the
project has been successfully built using settings for your current
platform or Any CPU.

The control is derived from background worker. In the VS 2013 project the control is "identified" and shown in the toolbox of the project. In my corrupt project solution the control is not shown in the toolbox.

The Control is directly in my project and not loaded from anywhere else.

I'm using this control for years and never had problems. What can I do?

Viewing all 2763 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>