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

MSBuild randomly fails to sign assemblies

$
0
0

We have a JetBrains Team City setup to run our CI  builds, and since upgrading to MSBuildTools v14.0 we are experiencing the following errors on 1-3 builds out of 150. Which builds fail seem entirely random (suggesting some sort of race condition at play), but the errors are consistently related to assembly signing:

CSC error CS7027: Error signing output with public key from file '..\..\..\Build\StrongNameKey.snk' -- The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

CSC error CS7027: Error signing output with public key from file '..\..\..\Build\StrongNameKey.snk' -- The directory name is invalid.

However, when a failing build is selected to run individually, it invariably succeeds.

I should note that the various applications being built are set up (in their various projects files) to be signed using the common Strong Name Key file that is included in the project as a linked file.

Has anyone encountered a similar issue?

-SRG


Linker tries to use .lib file instead of the .dll file

$
0
0

I'm in the process of porting a large Win32 MFC project from VS2010 to VS2015.

I'm now getting this error:

LINK : fatal error LNK1104: cannot open file 'D:\CSG\WSSDEV_vs2015\wfx\bin\wfx_eng_usa.lib'

It can't find that file because it doesn't exist.  However, there is a wfx_eng_usa.dll file in that location.  How can I tell the linker to use the .dll file?

Two vcxproj files follow:

wfxgui.vcxproj -- This is the application that is failing to link

NOTE: I've removed some sections as they were quite long and I do not believe they were relevant to the problem.  The removed content is noted with "<!-- Removed ..." comments.

<?xml version="1.0" encoding="utf-8"?><Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><ItemGroup Label="ProjectConfigurations"><ProjectConfiguration Include="Debug|Win32"><Configuration>Debug</Configuration><Platform>Win32</Platform></ProjectConfiguration><ProjectConfiguration Include="Release|Win32"><Configuration>Release</Configuration><Platform>Win32</Platform></ProjectConfiguration><ProjectConfiguration Include="Template|Win32"><Configuration>Template</Configuration><Platform>Win32</Platform></ProjectConfiguration></ItemGroup><PropertyGroup Label="Globals"><ProjectGuid>{121F6C3B-4515-45B7-9AE4-9A05909F1B2E}</ProjectGuid><RootNamespace>wfxgui</RootNamespace><Keyword>MFCProj</Keyword></PropertyGroup><Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /><PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"><ConfigurationType>Application</ConfigurationType><UseOfMfc>Static</UseOfMfc><CharacterSet>MultiByte</CharacterSet><PlatformToolset>v140</PlatformToolset></PropertyGroup><PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"><ConfigurationType>Application</ConfigurationType><UseOfMfc>Static</UseOfMfc><CharacterSet>MultiByte</CharacterSet><PlatformToolset>v140</PlatformToolset></PropertyGroup><PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Template|Win32'"><PlatformToolset>v140</PlatformToolset></PropertyGroup><Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /><ImportGroup Label="ExtensionSettings"></ImportGroup><ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"><Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /><Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /></ImportGroup><ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"><Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /><Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /></ImportGroup><PropertyGroup Label="UserMacros" /><PropertyGroup><_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion><OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)/bin/</OutDir><IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir><LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"></LinkIncremental><OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)/bin/</OutDir><IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir><LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental><CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet><CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /><CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /><CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet><CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /><CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /><CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">AllRules.ruleset</CodeAnalysisRuleSet><CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" /><CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" /><TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Workforce_ManagementD</TargetName><TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Workforce_Management</TargetName><PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</PreBuildEventUseInBuild><PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PostBuildEventUseInBuild><ReferencePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;$(VCInstallDir)bin</ReferencePath></PropertyGroup><ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"><BuildLog><Path>.\wfxgui\BuildLog.htm</Path></BuildLog><Midl><PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions><MkTypLibCompatible>false</MkTypLibCompatible></Midl><ClCompile><Optimization>Disabled</Optimization><AdditionalIncludeDirectories>..\..\guilibs\src;..\..\guilibs\include;..\wfxguilibs\src\DispMfc;..\wfxguilibs\src\DL1;..\wfxguilibs\src\NotesMfc;..\wfxguilibs\src\WfxAdapter;..\wfxguilibs\include;..\wfxres\src\eng_usa;..\wfxres\include;..\..\ootlibs\src\generic;..\..\wfxlibs\src\common;..\..\wfxlibs\src\disp;..\..\wfxlibs\src\wo;..\..\wfxlibs\src\cando;..\..\ootlibs\src\crypt;..\..\ootlibs\src\gipcsnarf;..\..\ootlibs\src\snarf;..\..\ootlibs\src\threads;..\..\wfxlibs\src\gprocs;..\..\wfxlibs\src\wupscnx;..\..\ootlibs\include;..\..\wfxlibs\src\joecnx;..\..\CEF\cef_binary_3.2526.1366.g8617e7c_windows32;..\..\CEF\cef_binary_3.2526.1366.g8617e7c_windows32\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories><PreprocessorDefinitions>WINVER=0x0501;_WINSOCK_DEPRECATED_NO_WARNINGS;NO_WARN_MBCS_MFC_DEPRECATION;%(PreprocessorDefinitions)</PreprocessorDefinitions><MinimalRebuild>true</MinimalRebuild><BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks><RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary><TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType><PrecompiledHeader>Use</PrecompiledHeader><WarningLevel>Level3</WarningLevel><DebugInformationFormat>EditAndContinue</DebugInformationFormat><CompileAs>Default</CompileAs></ClCompile><ResourceCompile><PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions><Culture>0x0409</Culture><AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories></ResourceCompile><Link><AdditionalDependencies>delayimp.lib;generic.lib;cando.lib;common.lib;disp.lib;wo.lib;wupscnx.lib;joecnx.lib;%(AdditionalDependencies)</AdditionalDependencies><OutputFile>$(SolutionDir)/bin/Workforce_ManagementD.exe</OutputFile><AdditionalLibraryDirectories>..\lib;..\..\ootlibs\src\generic\debug;..\..\wfxlibs\src\cando\debug;..\..\wfxlibs\src\common\debug;..\..\wfxlibs\src\disp\debug;..\..\wfxlibs\src\wo\debug;..\..\wfxlibs\src\wupscnx\debug;..\..\wfxlibs\src\joecnx\debug;..\..\CEF\cef_binary_3.2526.1366.g8617e7c_windows32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories><IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries><IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries><GenerateDebugInformation>true</GenerateDebugInformation><SubSystem>Windows</SubSystem><TargetMachine>MachineX86</TargetMachine><AdditionalOptions>/DEFAULTLIB:gdiplus.lib
 %(AdditionalOptions)</AdditionalOptions><DelayLoadDLLs>libcef.dll</DelayLoadDLLs></Link><PostBuildEvent><!-- Removed lengthy post-build process --></PostBuildEvent></ItemDefinitionGroup><ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"><BuildLog><Path>.\wfxgui\BuildLog.htm</Path></BuildLog><PreBuildEvent><Command>%SHELL% ./scripts/gen_release_cpp.ksh</Command></PreBuildEvent><Midl><PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions><MkTypLibCompatible>false</MkTypLibCompatible></Midl><ClCompile><Optimization>Full</Optimization><AdditionalIncludeDirectories>..\..\guilibs\src;..\wfxguilibs\src\DispMfc;..\wfxguilibs\src\DL1;..\wfxguilibs\src\NotesMfc;..\wfxguilibs\src\WfxAdapter;..\wfxguilibs\include;..\wfxres\include;..\wfxres\src\eng_usa;..\..\ootlibs\src\generic;..\..\wfxlibs\src\common;..\..\wfxlibs\src\disp;..\..\wfxlibs\src\wo;..\..\wfxlibs\src\cando;..\..\ootlibs\src\gipcsnarf;..\..\ootlibs\src\snarf;..\..\ootlibs\src\threads;..\..\wfxlibs\src\gprocs;..\..\wfxlibs\src\wupscnx;..\..\ootlibs\include;..\..\guilibs\include;..\..\wfxlibs\src\joecnx;..\..\CEF\cef_binary_3.2526.1366.g8617e7c_windows32;..\..\CEF\cef_binary_3.2526.1366.g8617e7c_windows32\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories><PreprocessorDefinitions>WINVER=0x0501;%(PreprocessorDefinitions)</PreprocessorDefinitions><MinimalRebuild>false</MinimalRebuild><RuntimeLibrary>MultiThreaded</RuntimeLibrary><BufferSecurityCheck>false</BufferSecurityCheck><TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType><PrecompiledHeader>Use</PrecompiledHeader><WarningLevel>Level3</WarningLevel><DebugInformationFormat></DebugInformationFormat><CallingConvention>Cdecl</CallingConvention><CompileAs>Default</CompileAs></ClCompile><ResourceCompile><PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions><Culture>0x0409</Culture><AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories></ResourceCompile><Link><AdditionalDependencies>delayimp.lib;wfxguilibs.lib;generic.lib;cando.lib;common.lib;disp.lib;wo.lib;wupscnx.lib;joecnx.lib;%(AdditionalDependencies)</AdditionalDependencies><OutputFile>$(SolutionDir)/bin/Workforce_Management.exe</OutputFile><AdditionalLibraryDirectories>..\lib;..\..\wfxlibs\src\release;..\..\ootlibs\src\release;..\..\CEF\cef_binary_3.2526.1366.g8617e7c_windows32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories><IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries><IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries><GenerateDebugInformation>true</GenerateDebugInformation><SubSystem>Windows</SubSystem><OptimizeReferences>true</OptimizeReferences><EnableCOMDATFolding>true</EnableCOMDATFolding><TargetMachine>MachineX86</TargetMachine><DelayLoadDLLs>libcef.dll</DelayLoadDLLs></Link><PostBuildEvent><!-- Removed lengthy post-build process --></PostBuildEvent></ItemDefinitionGroup><ItemGroup><!-- Removed lengthy list of .cpp files --></ItemGroup><ItemGroup><None Include="src\html\DashboardTechView.htm"><DeploymentContent>true</DeploymentContent></None><None Include="src\html\DashboardView.htm"><DeploymentContent>true</DeploymentContent></None><None Include="src\html\MapHtmlDlg.htm"><DeploymentContent>true</DeploymentContent></None><None Include="src\html\MapHtmlSearchDlg.htm"><DeploymentContent>true</DeploymentContent></None><None Include="src\res\launcher.ico" /><None Include="src\res\Wfx.ico" /><None Include="src\res\WfxDoc.ico" /></ItemGroup><ItemGroup><!-- Removed long list of .h files --></ItemGroup><ItemGroup><ResourceCompile Include="src\Wfx.rc" /></ItemGroup><ItemGroup><!-- Removed long list of irrelevant project references --><ProjectReference Include="..\wfxres\wfxres.vcxproj"><Project>{f05d7b13-c026-4a23-8733-ac5ddf984adf}</Project><ReferenceOutputAssembly>false</ReferenceOutputAssembly></ProjectReference></ItemGroup><Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /><ImportGroup Label="ExtensionTargets"></ImportGroup><ProjectExtensions><VisualStudio><UserProperties RESOURCE_FILE="..\wfxres\src\eng_usa\wfx_eng_usa.rc" /></VisualStudio></ProjectExtensions></Project>

wfxres.vcxproj -- Resource project that created the .dll file

<?xml version="1.0" encoding="utf-8"?><Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><ItemGroup Label="ProjectConfigurations"><ProjectConfiguration Include="Release|Win32"><Configuration>Release</Configuration><Platform>Win32</Platform></ProjectConfiguration></ItemGroup><PropertyGroup Label="Globals"><ProjectGuid>{F05D7B13-C026-4A23-8733-AC5DDF984ADF}</ProjectGuid><RootNamespace>wfxres</RootNamespace><Keyword>Win32Proj</Keyword><WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion></PropertyGroup><Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /><PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"><ConfigurationType>DynamicLibrary</ConfigurationType><UseOfMfc>Dynamic</UseOfMfc><CharacterSet>MultiByte</CharacterSet><PlatformToolset>v140</PlatformToolset></PropertyGroup><Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /><ImportGroup Label="ExtensionSettings"></ImportGroup><ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"><Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /><Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /></ImportGroup><PropertyGroup Label="UserMacros" /><PropertyGroup><_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion><OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)/bin/</OutDir><IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir><LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental><CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet><CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /><CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /><TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">wfx_eng_usa</TargetName><PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PreBuildEventUseInBuild></PropertyGroup><ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"><BuildLog><Path>.\wfxres\BuildLog.htm</Path></BuildLog><PreBuildEvent><Message>Generating AppVersion.h...</Message><Command>perl ./gen_appversion_h.pl</Command></PreBuildEvent><ClCompile><PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WFXRES_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions><RuntimeLibrary>MultiThreaded</RuntimeLibrary><PrecompiledHeader></PrecompiledHeader><WarningLevel>Level3</WarningLevel><DebugInformationFormat>ProgramDatabase</DebugInformationFormat></ClCompile><ResourceCompile><AdditionalIncludeDirectories>.\include;..\..\include;..\..\guilibs\src;..\..\..\guilibs\src;..\..\..\..\guilibs\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories><SuppressStartupBanner>true</SuppressStartupBanner></ResourceCompile><Link><OutputFile>$(SolutionDir)/bin/wfx_eng_usa.dll</OutputFile><GenerateDebugInformation>false</GenerateDebugInformation><SubSystem>Windows</SubSystem><OptimizeReferences>true</OptimizeReferences><EnableCOMDATFolding>true</EnableCOMDATFolding><NoEntryPoint>true</NoEntryPoint><ImportLibrary></ImportLibrary><TargetMachine>MachineX86</TargetMachine></Link></ItemDefinitionGroup><ItemGroup><ResourceCompile Include="src\eng_usa\wfx_eng_usa.rc" /></ItemGroup><ItemGroup><!-- Removed lengthy list of .bmp and .ico files --><None Include="src\eng_usa\res\DashboardView.htm"><DeploymentContent>true</DeploymentContent></None></ItemGroup><ItemGroup><ClInclude Include="include\AppVersion.h" /><ClInclude Include="src\eng_usa\resource.h" /><ClInclude Include="include\wfx_eng_usa.h" /></ItemGroup><Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /><ImportGroup Label="ExtensionTargets"></ImportGroup></Project>

Thanks for your help,

Kurt Jacobson


VB Deployment wity ms access database

$
0
0

Does the computer of the receiver of the deployment require access runtime or access software installed?

$(TargetedFrameworkDir) incorrectly defined not fixed in vs2013 update 5

How to set execution policy in visual studio post build event?

$
0
0
I have a project which is being compiled for both x86 and x64 target. I want to run exe as post build event. i.e Run x86 exe if it is compiled in x86 machine and x64 exe if it is compiled on x64 machine.  

Toolset v140 in VS2013

$
0
0
I have a C++ project which is upgraded so that it uses Platform Toolset "Visual Studio 2015 (v140)". The upgrade was done simply by opening the project in VS2015. I also have VS2013 installed and would like to know how I can build my project there using the v140 Toolset? If I open the project in VS2013, under Project Properties > General > Platform Toolset the toolset appears as "v140 (not installed)" and the project doesn't build. However, the toolset is installed.

Error: The command "call "%VS140COMNTOOLS%vsvars32"..

$
0
0

Hello,

I'm trying to create a class library Tool for Autodesk Inventor 2014 with Visual Studio 2015 community.

I installed the Visual Studio template for creating a class library but when I run a debug it gives me following error.

Severity	Code	Description	Project	File	Line	Suppression State
Error		The command "call "%VS140COMNTOOLS%vsvars32"
			mt.exe -manifest "J:\VB.NET - Plugins\EMIA\EMIA\EMIA.X.manifest" -outputresource:"J:\VB.NET - Plugins\EMIA\EMIA\bin\Debug\EMIA.dll";#2" exited with code 9009.	EMIA			

What does this mean? I checked the CMD with the "SET" command to see if "VS140COMNTOOLS" is there and it is. (See attached screenshot)


MS Build Error after applying Update 1 to Visual Studion 2015

$
0
0

After applying update 1 on our build servers a few builds are now failing.   

 C:\Program Files (x86)\MSBuild\14.0\bin\amd64\Microsoft.VisualBasic.Core.targets (56): "vbc.exe" exited with code 255.


Relating the .vcxproj to the GUI

$
0
0

I'm trying to debug a 3rd party library.

Within the .vcxproj file it has...

<ItemGroup><CustomBuild Include="..\..\..\..\packageinfo.sh"><Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Using NT Shell Script to generate version.c</Message><Message Condition="'$(Configuration)|$(Platform)'=='DebugXP|Win32'">Using NT Shell Script to generate version.c</Message><Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\scripts\mkver.bat -P $(ProjectName)</Command>

Where can I see this in the GUI? I have opened the 'Property pages' (Solution Explorer > right-mouse-click on top-level of project > Properties) but I cant find it anywhere.

I am on VS 2013 with a C++ project.


library configuration file not copied to referenced project

$
0
0

I've got a solution with two projects; a class library and a windows app. The windows app project references the class library and has the Copy Local attribute set to True. Visual Studio/MSBuild is not recognizing that the class library has a configuration file and does not copy it over to the windows app's bin\debug folder causing the app to crash because the library needs to look up setting in the configuration file. 

Does visual studio or msbuild have the ability to copy the configuration file without having to resort to post-build events?

Not able to build csc task with 4.6.1 .net framework using msbuild.exe

$
0
0

I have created my msbuild xml to build the project . I have used CSC task as it requires different files to be complied and includes previously compiled out put dll. I am trying to build it with latest .net framework 4.6.1 using msbuild.exe . But each time I build and check framework version using de-compiler , it shows 4.0 . Can anybody tell a way to forcefully compile with 4.6.1? p.s: TargetFrameworkVersion also not working. Ant Task used to call msbuild ;

<Projectxmlns="http://schemas.microsoft.com/developer/msbuild/2003"DefaultTargets="Build"ToolsVersion="14.0"><targetname="ms-build"depends="version"><echomessage="Building Proj"/><execexecutable="C:\Windows\Microsoft.NET\Framework64\v4.0.30319 \MSBuild.exe"failifexecutionfails="false"><argline="${src}/Proj/Proj.build /p:Configuration=Release /p:debug=None /p:TargetFrameworkVersion=v4.6.1 /p:VisualStudioVersion=14.0"/></exec><echomessage="Completed building Projand DLL"/></target>

<Projectxmlns="http://schemas.microsoft.com/developer/msbuild/2003"DefaultTargets="Build"ToolsVersion="14.0"><PropertyGroup><TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion><output>../../build/out</output></PropertyGroup><TargetName="Build"Label="Builds Service exe"><ItemGroup><UtilsSourceInclude="Utils\tools\*.cs"/><UtilsSourceInclude="Utils\xml\*.cs"/><UtilsSourceInclude="Utils\objects\*.cs"/></ItemGroup><CSCSources="@(UtilsSource)"TargetType="library"OutputAssembly="$(output)/Utils.dll"DebugType="@(debug)"Optimize="false"NoConfig="@(noconfig)"GenerateFullPaths="true"></CSC><ItemGroup><ProjSourceInclude="Proj2\*.cs"/><ProjSourceInclude="Proj2\Test.cs"/><ProjRefInclude="$(output)/Utils.dll"/><ProjRefInclude="$(output)/Test.dll"/><ProjRefInclude="lib\Microsoft.*.dll"/><ProjRefInclude="lib\Microsoft.Office.Server.dll"/><ProjRefInclude="lib\Microsoft.Office.Server.UserProfiles.dll"/></ItemGroup><CSCTargetType="library"OutputAssembly="$(output)/Proj.dll"DebugType="@(debug)"Optimize="false"NoConfig="@(noconfig)"References="@(ProjRef)"Sources="@(ProjSource)"></CSC></Target>

How to use the GenerateBootstrapper task to install .NET Framework 4.6.1 as a prerequisite.

$
0
0

Heyho community,

I followed this article to be able to use the GenerateBootstrapper task to install .NET Framework 4.6.1 as a prerequisite. Unlike in the article I am not using this in a ClickOnce installer but in a MSI installer project. Unfortunately it doesn't work properly yet. When I start the installer on a machine with no .NET Framework installed I get the following error after accepting the eula of the .NET Framework 4.6.1 installer:

The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [NTProductType] = 1 {int}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.1.1 {version}
Running checks for package 'Microsoft .NET Framework 4.6.1 (x86 and x64)', phase BuildList
Reading value 'Release' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full'
Read integer value 393297
Setting value '393297 {int}' for property 'DotNet46Full_Release'
Reading value 'v4' of registry key 'HKLM\SOFTWARE\Microsoft\NET Framework Setup\OS Integration'
Unable to read registry value
Not setting value for property 'DotNet46Full_OSIntegrated'
The following properties have been set for package 'Microsoft .NET Framework 4.6.1 (x86 and x64)':
Property: [DotNet46Full_Release] = 393297 {int}
Running checks for command 'DotNetFX461\NDP461-KB3102436-x86-x64-AllOS-ENU.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': true
Result of checks for command 'DotNetFX461\NDP461-KB3102436-x86-x64-AllOS-ENU.exe' is 'Bypass'
Running checks for command 'DotNetFX461\NDP461-KB3102436-x86-x64-AllOS-ENU.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': true
Result of checks for command 'DotNetFX461\NDP461-KB3102436-x86-x64-AllOS-ENU.exe' is 'Bypass'
Running checks for command ' NDP461-KB3102438-Web.exe'
Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': false
Result of running operator 'ValueGreaterThanEqualTo' on property 'DotNet46Full_Release' and value '394271': false
Skipping ByPassIf because Property 'DotNet46Full_OSIntegrated' was not defined
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '6.0.0': false
Result of running operator 'ValueEqualTo' on property 'ProcessorArchitecture' and value 'IA64': false
Result of checks for command ' NDP461-KB3102438-Web.exe' is 'Install'
Running checks for command ' NDP461-KB3102438-Web.exe'
Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': false
Result of running operator 'ValueGreaterThanEqualTo' on property 'DotNet46Full_Release' and value '394271': false
Skipping ByPassIf because Property 'DotNet46Full_OSIntegrated' was not defined
Result of running operator 'ValueNotExists' on property 'DotNet46Full_OSIntegrated': true
Result of checks for command ' NDP461-KB3102438-Web.exe' is 'Bypass'
'Microsoft .NET Framework 4.6.1 (x86 and x64)' RunCheck result: Install Needed
Running checks for package 'Windows Installer 4.5', phase BuildList
Looking up path for special folder 'WindowsFolder'
Running check with folder 'C:\Windows\System32' and file 'msi.dll'
Attempting to find file 'C:\Windows\System32\msi.dll'
File version is '5.0.7601.17514'
Setting value '5.0.7601.17514 {version}' for property 'VersionMsiDll'
The following properties have been set for package 'Windows Installer 4.5':
Property: [VersionMsiDll] = 5.0.7601.17514 {version}
Running checks for command 'WindowsInstaller4_5\WindowsXP-KB942288-v3-x86.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '4.5': true
Result of checks for command 'WindowsInstaller4_5\WindowsXP-KB942288-v3-x86.exe' is 'Bypass'
Running checks for command 'WindowsInstaller4_5\WindowsXP-KB958655-v2-x86-ENU.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22299': true
Result of checks for command 'WindowsInstaller4_5\WindowsXP-KB958655-v2-x86-ENU.exe' is 'Bypass'
Running checks for command 'WindowsInstaller4_5\WindowsServer2003-KB942288-v4-x86.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '4.5': true
Result of checks for command 'WindowsInstaller4_5\WindowsServer2003-KB942288-v4-x86.exe' is 'Bypass'
Running checks for command 'WindowsInstaller4_5\WindowsServer2003-KB958655-v2-x86-ENU.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22299': true
Result of checks for command 'WindowsInstaller4_5\WindowsServer2003-KB958655-v2-x86-ENU.exe' is 'Bypass'
Running checks for command 'WindowsInstaller4_5\WindowsServer2003-KB942288-v4-x64.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '4.5': true
Result of checks for command 'WindowsInstaller4_5\WindowsServer2003-KB942288-v4-x64.exe' is 'Bypass'
Running checks for command 'WindowsInstaller4_5\WindowsServer2003.WindowsXP-KB958655-v2-x64-ENU.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22299': true
Result of checks for command 'WindowsInstaller4_5\WindowsServer2003.WindowsXP-KB958655-v2-x64-ENU.exe' is 'Bypass'
Running checks for command 'WindowsInstaller4_5\Windows6.0-KB958655-v2-x86.MSU'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22308': true
Result of checks for command 'WindowsInstaller4_5\Windows6.0-KB958655-v2-x86.MSU' is 'Bypass'
Running checks for command 'WindowsInstaller4_5\Windows6.0-KB958655-v2-x64.MSU'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22308': true
Result of checks for command 'WindowsInstaller4_5\Windows6.0-KB958655-v2-x64.MSU' is 'Bypass'
'Windows Installer 4.5' RunCheck result: No Install Needed
EULA for components 'Microsoft .NET Framework 4.6.1 (x86 and x64)' was accepted.
Copying files to temporary directory "C:\Users\...\AppData\Local\Temp\VSDFD8A.tmp\"
Error: The following package files could not be found:

Any help is highly appreciated.


Kind regards

René

kotukoga

$
0
0

//1///

<script>
        function ispitaj(recenica) {
            recenica = recenica.replace(/\s+/g, '');
            var nova = '';
            for (var i = recenica.length - 1; i >= 0 ; i--) {

                nova += recenica[i];
            }

            if (nova == recenica) {
                return true;
            }

        }

        var polje = [];
        for (var i = 1; i < 6; i++) {
            rec = prompt('Upisite ' + i + '. recenicu', '');
            polje.push(rec);
        }
        var recenice = '';
        for (var i = 0; i < polje.length; i++) {
            recenice += polje[i];
            if (ispitaj(polje[i])) { recenice += ' POLINDROM'; } else { recenice += ' NIJE POLINDROM' };
            recenice += '\n';

        };

        alert(recenice);
    </script>

//2//

        

function Osoba() {
    this.ime = '';
    this.prezime = '';
    this.posudjeniDVDovi = [];
}

function Videoteka() {
    this.Ponuda = [
        new DVD('Star Wars', 8.7),
        new DVD('Alien', 8.5),
        new DVD('Matrix', 8.7),
        new DVD('The Godfather', 9.2),
        new DVD('Inception', 8.8),
        new DVD('Interstellar', 8.8),
        new DVD('The silence of the Lambs', 8.6),
        new DVD('Django Uncained', 8.5),
        new DVD('2001: A space Odyssey', 8.3)
    ];
}

function DVD(naslov, ocjena) {
    this.naslov = naslov;
    this.imdbRank = ocjena;
    this.datumPosudbe = new Date();
}

Osoba.prototype = {
    ispisPosudenih: function () {
        var ispis = '';
        for (var i = 0; i < this.ispisPosudenih.length; i++) {
            ispis += this.ispisPosudenih.ToStrong();
        }
        return ispis;
    }
}

Videoteka.prototype = {
    getDVDPonuda: function () {
        var ispis = '';
        this.Ponuda.sort(function (a, b) {
            return b.imdbRank - a.imdbRank;
        })
        for (var i = 0; i < this.Ponuda.length; i++) {
            var dvd = this.Ponuda[i];

            ispis += i + 1 + '. ' + dvd.naslov + ' ' + '[' + dvd.imdbRank + ']';
            ispis += '\n';
        }
        return ispis;
    }
}

DVD.prototype = {
    ToString: function () {
        return this.naslov + ' [' + this.PosudbaKasni + ']';
    },
    PosudbaKasni: function () {
        var razlika = razlikaDana(new Date(), this.DatumPosudbe);
        return (razlika > trajanje) ? 'Kasni ' + (razlika - trajanje) + ' dana' : 'Preostalo je ' + (trajanje - razlika) + ' dana';
    }
}

function razlikaDana(d1, d1) {
    var razlika = Math.abs(d1.getTime() - d2.getTime());
    var dan_ms = 24 * 60 * 60 * 1000;
    return Math.ceil(razlika / dan_ms);
}



function getDateFromString(string) {
    var dateArray = string.split('.');
    var godina = dateArray[2];
    var mjesec = dateArray[1];
    var dan = dateArray[0];
    return new Date(godina, mjesec - 1, dan);
}


var o = new Osoba();
o.ime = prompt('Unesite ime:');
o.prezime = prompt('Unesite prezime:');

var v = new Videoteka();

do {
    var index = Number(prompt(v.getDVDPonuda())) - 1;
    var odabrani = v.Ponuda.splice(index, 1)[0];
    odabrani.datumPosudbe = getDateFromString(prompt('Datum posudbe:'));
    o.posudjeniDVDovi.push(odabrani);

} while (confirm('Zelite li iznajmiti jos DVD-ova?'));


function Ispis() {
    var ispis = o.ime + ' ' + o.prezime + ' je iznajmio/la DVD-ove: \n';
    ispis += ispisPosudenih();
    alert(ispis);
}

//3//

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>KS - Zadatak31</title>
    <style>
        table {
            border: 1px solid #cbcbcb;
        }

        div > table {
            margin: 0 auto;
            text-align:center;
            top:50%;
            left:50%;
        }

        div > table > tr:first-child {
            background-color:#787878;
        }

        tr:hover {
            background-color:orange;
            color: white;
        }
        tr::selection {
            color:black;
        }

    </style>
</head>
<body>
    <div>
        <table>
            <tr>
                <th>Ime</th>
                <th>Prezime</th>
                <th>Email</th>
                <th>Telefon</th>
            </tr>
            <tr>
                <td>Marko</td>
                <td>Marić</td>
                <td><a href="#">marko.maric@mail.hr</a></td>
                <td>091.123.4567</td>
            </tr>
            <tr>
                <td>Ana</td>
                <td>Anić</td>
                <td><a href="#">ana.anic@gmail.com</a></td>
                <td>098.456.9878</td>
            </tr>
            <tr>
                <td>Maja</td>
                <td>Majić</td>
                <td><a href="#">mm@e-mail.hr</a></td>
                <td>091.654.2585</td>
            </tr>
            <tr>
                <td>Ivan</td>
                <td>Ivić</td>
                <td><a href="#">ivic.ivan@yahoo.com</a></td>
                <td>095.528.4937</td>
            </tr>
            <tr>
                <td>Tea</td>
                <td>Teović</td>
                <td><a href="#">tea@googlemail.com</a></td>
                <td>097.114.5679</td>
            </tr>
            <tr>
                <td>Pero</td>
                <td>Perić</td>
                <td><a href="#">pero@mail.hr</a></td>
                <td>092.555.7894</td>
            </tr>
        </table>
    </div>
</body>
</html>

//4//

<script>
        $(document).ready(function () {

            $("#sirina").on('change', function () {
                var sirina = $('#sirina').val();
                $('#kocka').css('width', sirina);
            });

            $("#visina").on('change', function () {
                var visina = $('#visina').val();
                $('#kocka').css('height', visina);
            });

        });


    </script>

//5//

 

/// <reference path="jquery-ui-1.11.4.custom/jquery-ui-1.11.4.custom/jquery-ui.min.js" />
/// <reference path="jquery-1.11.3.min.js" />


$(document).ready(function () {

    $('.red1').draggable({
        revert:true
    });
    $('.red2').draggable({
        revert: true
    });


var postavke = {
    tolerance: 'touch',
    drop: function (e, ui) {
        if (confirm("Obrisati" + ui.draggable.text()))
            $(ui.draggable).remove();
        $(this).removeClass('red1','red2');
    }


};


$('#kos').droppable(postavke);

});

//6//

/// <reference path="jquery-1.11.3.min.js" />
/// <reference path="jquery-ui-1.11.4.custom/jquery-ui-1.11.4.custom/jquery-ui.min.js" />
var broj2 = 0;

$(document).ready(function () {
    pozoviAjax();


    $('#btnDodaj').on('click', function () {


        if ($('#txtIme').val() == '' || $('#txtPrezime').val() == '' || $('#txtEmail').val() == '' || $('#txtRodjendan').val() == '') {
            alert('Polje ne smije biti prazno.');
        } else {
            var Osoba = {
                Ime: $("#txtIme").val(),
                Prezime: $("#txtPrezime").val(),
                Email: $("#txtEmail").val(),
                DatumRod: $("#txtRodjendan").val()
            }

            var url = 'http://www.fulek.com/algebra/ks/InsertOsoba';
            $.post(url, Osoba, function () {
                alert("Upisao sam\n" + Osoba);
            });
            $('ul#osobe').empty();
            $('ul#osobe').prepend(napraviLi(Osoba.Ime + " " + Osoba.Prezime));
            var provjera = document.getElementsByTagName('li')[0];
            var broj = document.getElementsByTagName('li');
            console.log(broj.length);

            for (var i = 0; i < broj2; i++) {
                var liValue = broj[i].value;
                if( liValue != provjera.value ){
                    pozoviAjax();
                }
            }
            

        
        }

    });
});


function pozoviAjax() {

    $.ajax({
        url: 'http://www.fulek.com/algebra/ks/GetOsobe',
        dataType: 'JSON',
        type:'POST',
        success:function(data){
            $(data).each(function(index,objekt){
                dodajuDiv(objekt);
            });
        }
    }); //kRAJ ajaxa

}//kraj funkcije

function dodajuDiv(objekt) {
    

    $('ul#osobe').append(napraviLi(objekt.label));
    broj2++;

}


function napraviLi(unos) {
    var li = document.createElement('li');
    var tekst = document.createTextNode(unos);

    li.appendChild(tekst);
    return li;
}



Link IAR compiler to visual studio 2012 to build embedded code.

$
0
0
 I have an embedded code that is being built in IAR . I want to build my code in VS12 using IAR as compiler.How can I link my IAR workbench compiler to Visual studio so that i can build my code in visual studio using IAR compiler for ARM?Thank you in advance

"No Silverlight project specified for Silverlight output" error at TFS build

$
0
0

Hi,

I am experiencing a weird Build error only when building with TFS, but not when building with VS. Already posted this problem in the TFS Build Forum and I was redirected by the TFS guys to this forum in order to get better response. I'll copy over the problem description from previous thread:

I am experiencing a weird error, but first some description of the solution I have. It is a solution containing WPF and Silverlight projects. The WPF projects are class libraries which are played by a WPF application. Silverlight projects are Silverlight apps referenced by a Web application which is hosting them.

I get the error (from the title) when starting build over TFS, yet this error does not pop up if building this solution locally with Visual Studio. I should also mention that previously these Silverlight apps were hosted by another Web application (Web forms) and that this error started happening after deciding to host them another Web application (MVC). Locally, everything builds and runs smoothly, but TFS throws build errors..

Here is a snippet from the TFS build output. I hope somebody can provide insight into this weird behaviour. Thanks in advance!

MSBUILD : error : Copying file D:\24\APP_NX\APPmain\Sources\Testconversion\Template\Silverlight\SCT\REFDEMOAPP\REFDEMOAPP001\Bin\Release\REFDEMOAPP001.xap failed. No Silverlight project specified for Silverlight output D:\24\APP_NX\APPmain\Sources\Testconversion\Template\Silverlight\SCT\REFDEMOAPP\REFDEMOAPP001\Bin\Release\REFDEMOAPP001.xap. [D:\24\APP_NX\APPmain\Sources\src\UI\APP.UI.Testplayer.Testplayer.HTML\WebTestPlayer.csproj]

More info: we are using TFS 2013 (Update 1) with VS 2015.




MSBuild Error while packaging

$
0
0

Hi All,

I am using Developer command prompt for generating build.

>MSBuild MyPRoj.sln /t:Rebuild /p:Configuration=Release;OutDir=..\Release\;Platform="x86"

But in output folder it is generating with another platform "ARM" appx file

if I give platform "x64" it is generating  x86,ARM appx files

please help me how to generate builds for all platforms like MyProj_1.0.0.o_x86_x64_arm.appxbundle.

when i am following this

https://msdn.microsoft.com/library/windows/apps/hh924768.aspx

I am getting an error  ( attached please check )

please tell me how to take build for all platforms.

Thanks

Sarvesh


sarvesh

MSBuild.exe for compiled code (VB6).

$
0
0

Hi

I have a requirement of using MSbuild.exe for building the vb6 code and moving the code from build server to webservers.

I am struggling to figure out how will be the build.proj file will look like in this case? 

My build.proj file looks like this

<?xml version="1.0" encoding="utf-8" ?><Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ><PropertyGroup><TargetFrameworkVersion>v1.0</TargetFrameworkVersion></PropertyGroup><Target Name="DeployDev"><!-- Delete target folders on web --><Exec Command="RMDIR /S /Q \\machineName\C$\Projects\SERVERS\DEV\WATCH"/><!-- Xcopy files to target ABC web folders --><Exec Command="xcopy /Q /E /I /Y \\MachineName\C$\Projects\TEST_PROJECT\TestApplicationVB6 \machineName\C$\Projects\SERVERS\DEV\WATCH"/></Target><Target Name="DeployUAT"><!-- Delete target folders on web --><Exec Command="RMDIR /S /Q \\machineName\C$\Projects\SERVERS\UAT\WATCH"/><!-- Xcopy files to target ABC web folders --><Exec Command="xcopy /Q /E /I /Y \\machineName\C$\Projects\TEST_PROJECT\TestApplicationVB6 \\machineName\C$\Projects\SERVERS\UAT\WATCH"/></Target></Project>

Any help or suggestion is appreciated. 


NA

javascript

$
0
0
Getting started in Microsoft Blend for Javascript

Does MS Build Tools 2013 support framework 4.5.2

$
0
0

Can MS Build Tools 2013 v12.0,  support framework 4.5.2? i.e can Build Tools 2013 v12.0 build .Net applications targeting framework 4.5.2? 

Thanks - Rohit

 



Rohit

How to disable MSBUILD?

$
0
0

I am tyring to compile third party code that is stated that it wont compile with MSBUILD. 

I am using Visual Studio 2012 11.0, Intel Composer XE 2013 and C++ 2012.

Is there a way to disable msbuild?

Any help would be appreciated.

Thanks

Viewing all 2763 articles
Browse latest View live


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