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

MSBUILD logger error MSB4104

$
0
0
I'm attempting to run a build script using MSBUILD, and I'm receiving an error when trying to create a log file.

Setting environment for using Microsoft Visual Studio 2005 x86 tools.

C:\Program Files\Microsoft Visual Studio 8\VC>msbuild "G:\MIS Applications\Release Mgt\MSBuild\Scripts\KDM\KDM_build.proj" /p:AppName=KDM /l:FileLogger,Microsoft.Build.Engine;logfile=c:\builds\KDM_build.log
Microsoft (R) Build Engine Version 2.0.50727.1433
[Microsoft .NET Framework, Version 2.0.50727.1433]
Copyright (C) Microsoft Corporation 2005. All rights reserved.

MSBUILD: Logger error MSB4104: Failed to write to log file "c:\builds\KDM_build.log". Unknown error "-1". 

Does anyone know what this means? I have not had this problem until today.


The build stopped unexpectedly because of an internal failure.

$
0
0
I,ve lookinf for for any solution, but i just spend two days and i dont hace success to reolve it, i just try to do is COMPILE the solution...  1.The HOTFIX theres no more available, 2. re install my VS2013 Professional, and many others... If someone please can help me how can resolvet It? this is the entire exception: 



"Error 1 The build stopped unexpectedly because of an internal failure. System.Text.EncoderFallbackException: Unable to translate Unicode character \uDEC1 at index 1017 to specified code page. at System.Text.EncoderExceptionFallbackBuffer.Fallback(Char charUnknown, Int32 index) at System.Text.EncoderFallbackBuffer.InternalFallback(Char ch, Char*& chars) at System.Text.UTF8Encoding.GetByteCount(Char* chars, Int32 count, EncoderNLS baseEncoder) at System.Text.UTF8Encoding.GetByteCount(String chars) at System.IO.BinaryWriter.Write(String value) at Microsoft.Build.BackEnd.NodePacketTranslator.NodePacketWriteTranslator.TranslateDictionary(Dictionary`2& dictionary, IEqualityComparer`1 comparer) at Microsoft.Build.Execution.BuildParameters.Microsoft.Build.BackEnd.INodePacketTranslatable.Translate(INodePacketTranslator translator) at Microsoft.Build.BackEnd.NodePacketTranslator.NodePacketWriteTranslator.Translate[T](T& value, NodePacketValueFactory`1 factory) at Microsoft.Build.BackEnd.NodeConfiguration.Translate(INodePacketTranslator translator) at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.NodeContext.SendData(INodePacket packet) at Microsoft.Build.BackEnd.NodeProviderOutOfProc.CreateNode(Int32 nodeId, INodePacketFactory factory, NodeConfiguration configuration) at Microsoft.Build.BackEnd.NodeManager.AttemptCreateNode(INodeProvider nodeProvider, NodeConfiguration nodeConfiguration) at Microsoft.Build.BackEnd.NodeManager.CreateNode(NodeConfiguration configuration, NodeAffinity nodeAffinity) at Microsoft.Build.Execution.BuildManager.PerformSchedulingActions(IEnumerable`1 responses) at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker) at Microsoft.Build.Execution.BuildManager.IssueRequestToScheduler(BuildSubmission submission, Boolean allowMainThreadBuild, BuildRequestBlocker blocker) "

...

Build failed in MSBuild

$
0
0

Hello,

I created a C++ MFC project and when configuring the build definition I kept the settings to default.

I received an error regarding these two files.

C:\Builds\1\TestFive\TestFiveAppTwo\Sources\D\Projects\TestFive\TestFiveApp\TestFiveApp\TestFiveApp.vcxproj (22)

: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

After doing some research I found reference to a work around and added this line to the build definition in the process tab under MSBuild Arguments:

/p:$(VCTargetsPath)="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.props"

Once I did this it appeared to resolve the issue related to “C:\Microsoft.Cpp.Default.props” However after that I no longer saw the issue related to C:\Builds\1\TestFive\TestFiveAppTwo\Sources\D\Projects\TestFive\TestFiveApp\TestFiveApp\TestFiveApp.vcxproj

Once I did the work around the issue for not finding this c:\build\1….  Disappeared and I only saw a vague error message

Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException)Exception Stack Trace:   at System.Activities.Statements.Throw.Execute(CodeActivityContext context)  at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)  at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

After fixing some Windows updates (KB2822241) (KB2998527), (KB2966827) and a code a code 800B0001 for a day I no longer needed the work around for C:\Microsoft.Cpp.Default.props”  and then was able to see the c:\build\1….   error again.

Without making any changes to the settings the error “C:\Microsoft.Cpp.Default.props” has reappeared a couple days later.

I went back to check for Windows Updates I get a code 800B0001 that was resolved by our IT but is now back again.

As a reference I created a simple C Sharp project that passes this portion and just has some warnings for an earlier part.

This appears to be failing at the “Get Impacted Tests, Index Sources and Publish Symbols. I unable to find what is generating the request for this file in the properties and options.

I can detailed log and or diagnostic log, or any other information that would assist resolving this issue.

Thank you,

Marla Manley

Make MSBuild test the COM registration and GAC to determine if a project is out-of-date

$
0
0

I have C++ project that builds a COM object. The postbuildstep - among other things - basically registers the COM object and creates and installs the interop assembly into the GAC:

regsvr32 /s "$(TargetPath).dll"
tlbgen ...
gacutil /i "$(TargetPath).interop.dll"

Now, I'd like MSBuild to test if the COM registration is intact and the interop assembly exists.
If not, then the project should become out-of-date and (at least) the postbuildstep should be executed.

I already figured out how to extract the type lib GUID from the IDL file and test if one important registry key is set:

<TypeLibGUID Condition="Exists('$(ProjectIncludeDir)\$(ProjectName).idl')">$([System.IO.File]::ReadAllText($(ProjectIncludeDir)\$(ProjectName).idl))</TypeLibGUID><TypeLibGUID>$([System.Text.RegularExpressions.Regex]::Match($(TypeLibGUID), `\[[^\]]+\]\s*library`))</TypeLibGUID><TypeLibGUID>$([System.Text.RegularExpressions.Regex]::Match($(TypeLibGUID), `uuid\([0-9A-F-]{36}\)`))</TypeLibGUID><TypeLibGUID>$([System.Text.RegularExpressions.Regex]::Match($(TypeLibGUID), `[0-9A-F-]{36}`))</TypeLibGUID><TypeLibRegistration>$([MSBuild]::GetRegistryValueFromView('HKEY_CLASSES_ROOT\TypeLib\{$(TypeLibGUID)}\1.0\0\win32', '', null, RegistryView.Registry64, RegistryView.Registry32))</TypeLibRegistration><IsTypeLibRegistered>false</IsTypeLibRegistered><IsTypeLibRegistered Condition="'$([System.Text.RegularExpressions.Regex]::Match($(TypeLibRegistration), `$(OutSubDir)\$(TargetName).dll`))' != ''">true</IsTypeLibRegistered>

But I have no clue how to modify MSBuilds behavior to check the project state.
Unfortunately, the "Diagnostic Output" of MSBuild does not help me if the project is up-to-date.
In that case, MSBuild does not tell me what it is doing prior to conluding that the project is "up-to-date" (i.e. what target outputs or files it has checked).

Should I define a target of some type? And where would I specify a dependency on that target?

Tfs commands in build events gets corrupted on .NET version changes

$
0
0

Hi Folks

There is an issue with downgrading (in Visual Studio 2013 ultimate) from .Net v4.x to .Net v3.5. it mangles the "Build Events" -> "Post-build event command line" and makes the project not buildable.

Here's the scenario:

1. create a class project in .Net v4.x
2. right-click on your project name, select Build Events" -> "Post-build event command line" -> "Edit Post-build ..."

paste this into the text box:

echo.
echo
*NEVER OVERLAY *.configs on the SSRS server, *DONT DEPLOY THEM*, only
hand-edit those config file listed in AReadMe.cs (Microsoft takes care
of the details per version of SQL Server)
echo *More here: http://msdn.microsoft.com/en-us/library/bb630448.aspx
echo.
IF exist "c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies" ( echo. )
IF exist "c:\Program Files\Microsoft Visual Studio
10.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2010x64 exists )
IF
exist "c:\Program Files\Microsoft Visual Studio
10.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*"
"c:\Program Files\Microsoft Visual Studio
10.0\Common7\IDE\PrivateAssemblies" )

IF exist "c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies" ( echo. )
IF
exist "c:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2010x86 exists )
IF
exist "c:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*"
"c:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE\PrivateAssemblies" )

IF exist "c:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies" (
echo. )
IF exist "c:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2012x64 exists )
IF
exist "c:\Program Files\Microsoft Visual Studio
11.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*"
"c:\Program Files\Microsoft Visual Studio
11.0\Common7\IDE\PrivateAssemblies" )

IF exist "c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies" ( echo. )
IF
exist "c:\Program Files (x86)\Microsoft Visual Studio
11.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2012x86 exists )
IF
exist "c:\Program Files (x86)\Microsoft Visual Studio
11.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*"
"c:\Program Files (x86)\Microsoft Visual Studio
11.0\Common7\IDE\PrivateAssemblies" )

IF exist
"c:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies" ( echo. )
IF exist "c:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2013x64 exists )
IF
exist "c:\Program Files\Microsoft Visual Studio
12.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*"
"c:\Program Files\Microsoft Visual Studio
12.0\Common7\IDE\PrivateAssemblies" )

IF exist "c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies" ( echo. )
IF
exist "c:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2013x86 exists )
IF
exist "c:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*"
"c:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\IDE\PrivateAssemblies" )

IF exist "c:\Program Files\Microsoft Visual Studio 13.0\Common7\IDE\PrivateAssemblies" ( echo. )
IF exist "c:\Program Files\Microsoft Visual Studio 13.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2014x64 exists )
IF
exist "c:\Program Files\Microsoft Visual Studio
13.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*"
"c:\Program Files\Microsoft Visual Studio
13.0\Common7\IDE\PrivateAssemblies" )

IF exist "c:\Program Files (x86)\Microsoft Visual Studio 13.0\Common7\IDE\PrivateAssemblies" ( echo. )
IF
exist "c:\Program Files (x86)\Microsoft Visual Studio
13.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2014x86 exists )
IF exist "c:\Program Files (x86)\Microsoft Visual Studio 13.0\Common7\IDE\PrivateAssemblies" ( copy
"$(TargetDir)$(TargetName).*" "c:\Program Files (x86)\Microsoft Visual Studio 13.0\Common7\IDE\PrivateAssemblies" )

IF exist "c:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies" ( echo. )
IF exist "c:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2015x64 exists )
IF
exist "c:\Program Files\Microsoft Visual Studio
14.0\Common7\IDE\PrivateAssemblies" ( copy "$(TargetDir)$(TargetName).*"
"c:\Program Files\Microsoft Visual Studio
14.0\Common7\IDE\PrivateAssemblies" )

IF exist "c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies" ( echo. )
IF
exist "c:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\PrivateAssemblies" ( echo Visual Studio 2015x86 exists )
IF
exist "c:\Program
Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies"
( copy "$(TargetDir)$(TargetName).*" "c:\Program Files (x86)\Microsoft
Visual Studio 14.0\Common7\IDE\PrivateAssemblies" )
echo.
echo ** what Visual Studio thinks your environment should be ...**
echo.
echo TargetDir: "$(TargetDir)"
echo TargetName: "$(TargetName)"
echo DevEnvDir: "$(DevEnvDir)"
echo.
copy "$(TargetDir)$(TargetName).*" "$(DevEnvDir)PrivateAssemblies\"
echo.
net stop "SQL Server Reporting Services (MSSQLSERVER)"
echo.
IF exist "C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo. )
IF exist "C:\Program Files\Microsoft SQL
Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo SQL Server 2008-MSRS10 exists )
IF
exist "C:\Program Files\Microsoft SQL
Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( copy
"$(TargetDir)$(TargetName).*" "C:\Program Files\Microsoft SQL
Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\" )

IF exist "C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo. )
IF
exist "C:\Program Files\Microsoft SQL
Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo
SQL Server 2012-MSRS11 exists )
IF
exist "C:\Program Files\Microsoft SQL
Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( copy
"$(TargetDir)$(TargetName).*" "C:\Program Files\Microsoft SQL
Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin\" )

IF exist "C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo. )
IF
exist "C:\Program Files\Microsoft SQL
Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo
SQL Server 2014-MSRS12 exists )
IF
exist "C:\Program Files\Microsoft SQL
Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( copy
"$(TargetDir)$(TargetName).*" "C:\Program Files\Microsoft SQL
Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\bin\" )

IF exist "C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo. )
IF
exist "C:\Program Files\Microsoft SQL
Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo
SQL Server 201x-MSRS13 exists )
IF
exist "C:\Program Files\Microsoft SQL
Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( copy
"$(TargetDir)$(TargetName).*" "C:\Program Files\Microsoft SQL
Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer\bin\" )

IF exist "C:\Program Files\Microsoft SQL Server\MSRS14.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo. )
IF
exist "C:\Program Files\Microsoft SQL
Server\MSRS14.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( echo
SQL Server 201x-MSRS14 exists )
IF
exist "C:\Program Files\Microsoft SQL
Server\MSRS14.MSSQLSERVER\Reporting Services\ReportServer\bin\" ( copy
"$(TargetDir)$(TargetName).*" "C:\Program Files\Microsoft SQL
Server\MSRS14.MSSQLSERVER\Reporting Services\ReportServer\bin\" )
echo.
net start "SQL Server Reporting Services (MSSQLSERVER)"

3. Next, compile, it works fine (in .Net v4.x) and never breaks for me in v4.x.

4. Convert the project to .Net v3.5

5. Build again, notice how Build Events" -> "Post-build event command line" get corrupted (shows up as an error on the compile).

6. copy the script above back into "Post-build event command line"

7. things NO LONGER BUILDs in .Net v3.5 (or maybe 1 in 10 might build now, and using a "Clean" first)

8. clear out the script again and cut the script (above) into smaller pieces and paste, recompiling for each chunk pasted (everything works now?)

Could anyone substantiate this?

Rob
PS My environment is Visual Studio 2013 Ultimate

CreateCSharpManifestResourceName not generating manifest for Global resource file in ASP.Net

$
0
0

Hi

I am using CreateCSharpManifestResourceName Task in .csproj Project file to generate manifest file. It works fine for Windows application resources as well as for asp.net application resources. The problem starts when I use resources under App_GlobalResource special folder in ASP.Net web Application.CreateCSharpManifestResourceName task is not able to recognize or detect the resources under global resource folder. What is the difference between resx files under Global resource special folder and resx files under normal folder with respect to MSBuild.

Can anybody help me in this so that I can fix this issue?

BR,

Jeet

Project gets built in VS, not using MSBuild - Missing references

$
0
0

Hi

I have a project which gets built successfully in both release as well as debug configuration modes when built using Visual Studio. However, the case is not the same when built using MSBuild

One of the modules is unable to resolve it's references and thus throws 'the type or namespace could not be ..". However, the assembly files that it requires have been built much before this module. Even in the build order list according to current dependencies, the required projects and assemblies are specified much before this module.

The said module finds the referenced files etc successfully when built in Visual Studio 2012. However, doesnt in MSBuild.

No framework mismatch. No config/platform mismatch. Have tried Build as well as Rebuild in MSBuild

Any help or hints towards a probable solution would be great

Thanks

namespace name 'Data' does not exist in the namespace

$
0
0

I have opened my VS2005 web application on VS2010, so the wizard asked me to convert the application. After the conversion, when I tried to build the application. Its throwing one exception like this...

Error 56 
The type or namespace name 'Data' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) 

Please help me on this...


What does Build | Deploy do?

$
0
0

For some project types (e.g., Windows Store JavaScript projects), there is a "Deploy <project name>" option on the Build menu.  For other project types (e.g. C# console app), there is no Deploy menu option.

I am wondering two things:

  1. What controls whether there is a "Deploy" option available?  Is there something in the project file (or one of the imports) that enables this?
  2. What does the Deploy option do?

For example, I know that choosing Build from the Build menu will essentially do the equivalent of running MSBuild on the project file with a target of "Build".  This means that one could tailor what the build does by updating the Build target, either directly or indirectly.  Does something similar happen with Deploy?  Is there something that i could update to tailor what the deploy does?  It does not seem to be as simple running a "Deploy" target from the project file.


VS2013 MSBuild error that does not occur with .Net V4.0 Framework.

$
0
0

I have VS2013 installed on a "clean" Windows 7 VM. Also installed in the system is the V4.0 .Net Framework. The following is a sample build script that demonstrates a problem I am having with a much larger script

<!-- *****************************-->
     <!DOCTYPE Project [
       <!ENTITY e_DefaultValue "Hello World">
     ]>
 
  <Project DefaultTargets="Display" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
      <MsgStr>&e_DefaultValue;</MsgStr>
    </PropertyGroup>
 
    <Target Name="Display">
      <Message Text='$(MsgStr)' />
    </Target>
 
</Project>

If I attempt to run the snippet using the VS2013 MSBuild executable, I get the following error:
 
The project file could not be loaded. Reference to undeclared entity 'e_DefaultValue'.
 
If I run it with the .Net v4.0 Framework version, it displays the message correctly.
 
Is this an issue where the VS2013 MSBuild needs something else defined?

Can I change the Source control folder from the TFSBuild.proj ?

$
0
0

Hello,

I have a simple question:

Can I change the Source control folder ( Edit Build Definition -> WorkSpace ->Source control folder  ) from the TFSBuild.proj ?

If yes ? how can I do this ?

Thank you

Houssam

Condition in MSBuild

$
0
0

Does anybody has any simple example about the MSBuild condition. I want to learn condition of MSBuild.

Post Build command exited with code 1 on x64 configuration rather work on x86 after upgrade from VS 2010 to 2013

$
0
0

I have a project with a post build event for both x86 and x64 architecture. I have just upgraded my visual studio from 2010 to 2013.

Post Build Script:
x86

<PostBuildEvent Condition="'$(Platform)'=='x86'">
  rmdir /s /q "$(TargetDir)DataAccess"
  mkdir "$(TargetDir)DataAccess"
  mkdir "$(TargetDir)DataAccess\Resources"
  rmdir /s /q "$(TargetDir)Modules\IddFiles"
  rmdir /s /q "$(TargetDir)Modules"
  mkdir "$(TargetDir)Modules"
  mkdir "$(TargetDir)Modules\IddFiles"
  rmdir /s /q "$(TargetDir)Templates"
  mkdir "$(TargetDir)Templates"
  mkdir "C:\Users\Public\LIO\LibrariesAndTemplates"
  rmdir /s /q "$(TargetDir)Components\HvacTemplateExpansion"
  mkdir "$(TargetDir)Components\HvacTemplateExpansion"

  rmdir /s /q "$(TargetDir)Stencils"
  mkdir "$(TargetDir)Stencils"
  rmdir /s /q "$(TargetDir)Images"
  mkdir "$(TargetDir)Images"
  rmdir /s /q "$(TargetDir)Help"
  mkdir "$(TargetDir)Help"
  copy "$(SolutionDir)ThirdPartyLibraries\Infragistics\CLR4.0_2013.2_2023\*.*" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\DevExpress\13.1.6\DevExpress*.*" "$(TargetDir)"

  copy "$(SolutionDir)ThirdPartyLibraries\x86\simplebim Developer\Modules\*.*" "$(TargetDir)Modules"
  del "$(TargetDir)Modules\Kitware.*
  del "$(TargetDir)Modules\simplebim.Developer.Libraries.*
  del "$(TargetDir)Modules\IFCEngine.dll"

  copy "$(SolutionDir)ThirdPartyLibraries\x86\simplebim Developer\*.*" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\x86\simplebim Developer\Modules\Kitware*.*" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\x86\simplebim Developer\Modules\simplebim.Developer.Libraries.*" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\Nevron\*.dll" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\LBNL\IDF_Toolbox\*.dll*" "$(TargetDir)Modules"
  copy "$(SolutionDir)ThirdPartyLibraries\LBNL\IDF_Toolbox\*.idd*" "$(TargetDir)Modules\IddFiles"
  copy "$(SolutionDir)ThirdPartyLibraries\LBNL\Modules\*.**" "$(TargetDir)Modules"
  copy "$(SolutionDir)ThirdPartyLibraries\Secom\*.dll*" "$(TargetDir)Modules\"
  copy "$(SolutionDir)ThirdPartyLibraries\CadLib\*.*" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\Secom\*.exp*" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\IfcUtilities\*.dll*" "$(TargetDir)"


  copy "$(SolutionDir)ThirdPartyLibraries\x86\simplebim Developer\Modules\IfcEngine.dll" "$(TargetDir)"

  copy "$(SolutionDir)MyModules\x86\*.*" "$(TargetDir)Modules"
  xcopy /E "$(SolutionDir)Images" "$(TargetDir)Images"
  copy "$(SolutionDir)*.ndx" "$(TargetDir)"
  copy "$(SolutionDir)*.nlb" "$(TargetDir)"
  copy "$(SolutionDir)*.ifc" "$(TargetDir)"
  copy "$(SolutionDir)*.png" "$(TargetDir)"
  copy "$(SolutionDir)Systems\Stencils\*.nlb" "$(TargetDir)Stencils"
  copy "$(SolutionDir)Systems\Stencils\*.ndx" "$(TargetDir)Stencils"
  copy "$(SolutionDir)DataAccess\Resources\*.*" "$(TargetDir)DataAccess\Resources"
  xcopy /E "$(SolutionDir)Templates" "$(TargetDir)Templates"
  rmdir /s /q "$(TargetDir)Templates\OlderVersions"

  copy "$(SolutionDir)Help\*.*" "$(TargetDir)Help"
  del "$(TargetDir)SimAdapter.dll"

  copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Logging.xml" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Common.xml" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Logging.dll" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Common.dll" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.Unity.dll" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.ObjectBuilder2.dll" "$(TargetDir)"
  copy "$(SolutionDir)ThirdPartyLibraries\IfcEngine\*.*" "$(TargetDir)"
  copy "$(SolutionDir)DataAccess\TempIDF\*.*" "$(TargetDir)Components\HvacTemplateExpansion"




  call "$(DevEnvDir)..\..\VC\bin\vcvars32"
  call "$(DevEnvDir)..\..\VC\bin\editbin" /LARGEADDRESSAWARE "$(TargetDir)Simergy.exe</PostBuildEvent>

x64

<PostBuildEvent Condition="'$(Platform)'=='x64'">
      rmdir /s /q "$(TargetDir)DataAccess"
        mkdir "$(TargetDir)DataAccess"
        mkdir "$(TargetDir)DataAccess\Resources"
        rmdir /s /q "$(TargetDir)Modules\IddFiles"
        rmdir /s /q "$(TargetDir)Modules"
        mkdir "$(TargetDir)Modules"
        mkdir "$(TargetDir)Modules\IddFiles"
        rmdir /s /q "$(TargetDir)Templates"
        mkdir "$(TargetDir)Templates"
        mkdir "C:\Users\Public\LIO\LibrariesAndTemplates"
        rmdir /s /q "$(TargetDir)Components\HvacTemplateExpansion"
        mkdir "$(TargetDir)Components\HvacTemplateExpansion"
        rmdir /s /q "$(TargetDir)Stencils"
        mkdir "$(TargetDir)Stencils"
        rmdir /s /q "$(TargetDir)Images"
        mkdir "$(TargetDir)Images"
        rmdir /s /q "$(TargetDir)Help"
        mkdir "$(TargetDir)Help"
        copy "$(SolutionDir)ThirdPartyLibraries\Infragistics\CLR4.0_2013.2_2023\*.*" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\DevExpress\13.1.6\DevExpress*.*" "$(TargetDir)"

        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\Modules\*.*" "$(TargetDir)Modules"
        del "$(TargetDir)Modules\Kitware.*
        del "$(TargetDir)Modules\simplebim.Developer.Libraries.*
        del "$(TargetDir)Modules\IFCEngine.dll"

        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\*.*" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\Modules\Kitware*.*" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\Modules\vtk*.*" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\Modules\cosmo*.*" "$(TargetDir)"

        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\Modules\vpic.dll" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\Modules\simplebim.Developer.Libraries.*" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\Nevron\*.dll" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\LBNL\IDF_Toolbox\*.dll*" "$(TargetDir)Modules"
        copy "$(SolutionDir)ThirdPartyLibraries\LBNL\IDF_Toolbox\*.idd*" "$(TargetDir)Modules\IddFiles"
        copy "$(SolutionDir)ThirdPartyLibraries\LBNL\Modules\*.**" "$(TargetDir)Modules"
        copy "$(SolutionDir)ThirdPartyLibraries\Secom\*.dll*" "$(TargetDir)Modules\"
        copy "$(SolutionDir)ThirdPartyLibraries\CadLib\*.*" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\Secom\*.exp*" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\IfcUtilities\*.dll*" "$(TargetDir)"

        copy "$(SolutionDir)ThirdPartyLibraries\x64\simplebim Developer\Modules\IfcEngine.dll" "$(TargetDir)"

        copy "$(SolutionDir)MyModules\x64\*.*" "$(TargetDir)Modules"
        xcopy /E "$(SolutionDir)Images" "$(TargetDir)Images"
        copy "$(SolutionDir)*.ndx" "$(TargetDir)"
        copy "$(SolutionDir)*.nlb" "$(TargetDir)"
        copy "$(SolutionDir)*.ifc" "$(TargetDir)"
        copy "$(SolutionDir)*.png" "$(TargetDir)"
        copy "$(SolutionDir)Systems\Stencils\*.nlb" "$(TargetDir)Stencils"
        copy "$(SolutionDir)Systems\Stencils\*.ndx" "$(TargetDir)Stencils"
        copy "$(SolutionDir)DataAccess\Resources\*.*" "$(TargetDir)DataAccess\Resources"
        xcopy /E "$(SolutionDir)Templates" "$(TargetDir)Templates"
        rmdir /s /q "$(TargetDir)Templates\OlderVersions"

        copy "$(SolutionDir)Help\*.*" "$(TargetDir)Help"
        del "$(TargetDir)SimAdapter.dll"

        copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Logging.xml" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Common.xml" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Logging.dll" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.EnterpriseLibrary.Common.dll" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.Unity.dll" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\Entlib\Microsoft.Practices.ObjectBuilder2.dll" "$(TargetDir)"
        copy "$(SolutionDir)ThirdPartyLibraries\IfcEngine\*.*" "$(TargetDir)"
        copy "$(SolutionDir)DataAccess\TempIDF\*.*" "$(TargetDir)Components\HvacTemplateExpansion"

        call "$(DevEnvDir)..\..\VC\bin\vcvars32"
        call "$(DevEnvDir)..\..\VC\bin\editbin" /LARGEADDRESSAWARE "$(TargetDir)Simergy.exe</PostBuildEvent><PreBuildEvent></PreBuildEvent>

In Visual Studio 2010, I was able to build with both architecture configuration. Now i am facing problem while compiling the project in x64 architecture every time.

But now i always gets the "exited with code 1" error. Along this i have tried to filter out the issue by referencing below links, but no success at all.
Error when trying to run in VS 2013
Post Build exited with code 1
Post-Build command exited with code 1 (trying to automatically generate NuGet packages)
Command Copy exited with Code 1
FIX: Visual Studio Post Build Event Returns –1 when it should not.
Post-build event with folders which contains spaces

I have tried the attrib -r command before doing the copy of files, but same issue raise every time.

Is there any way to get to the real error and check that what is going wrong?

Edit: Here is post build event for one project, above post build event for the whole solution:

Copy "$(TargetDir)$(TargetName).*" "$(SolutionDir)MyModules\$(Platform)"
Copy "$(SolutionDir)MyModules\$(Platform)" "$(SolutionDir)LIO_Source_GUI\bin\$(Platform)\$(ConfigurationName)\Modules"

it gives below error message,

Error   3   The command "Copy "D:\DevWorkSpaces\LIO_Source_Multihread\ProfileEditor\bin\x64\Debug\SIM_ScheduleEditor.*" "D:\DevWorkSpaces\LIO_Source_Multihread\MyModules\x64"
Copy "D:\DevWorkSpaces\LIO_Source_Multihread\MyModules\x64" "D:\DevWorkSpaces\LIO_Source_Multihread\LIO_Source_GUI\bin\x64\Debug\Modules"" exited with code 1.   ProfileEditor

-Niranjan Kala http://www.niranjankala.in




How to build a project in VS12 with DB in SQL Server2012

$
0
0

Hi all,

I have developed a vb.net project in VS12 with DB in SQL Server 2012. I need to publish it as .exe or .msi file. But I can't do so in VS2012 ultimate. During publishing, it shows an error 

" System.InvalidOperationException the connection string has not  been initialized" 

MSBUILD logger error MSB4104

$
0
0
I'm attempting to run a build script using MSBUILD, and I'm receiving an error when trying to create a log file.

Setting environment for using Microsoft Visual Studio 2005 x86 tools.

C:\Program Files\Microsoft Visual Studio 8\VC>msbuild "G:\MIS Applications\Release Mgt\MSBuild\Scripts\KDM\KDM_build.proj" /p:AppName=KDM /l:FileLogger,Microsoft.Build.Engine;logfile=c:\builds\KDM_build.log
Microsoft (R) Build Engine Version 2.0.50727.1433
[Microsoft .NET Framework, Version 2.0.50727.1433]
Copyright (C) Microsoft Corporation 2005. All rights reserved.

MSBUILD: Logger error MSB4104: Failed to write to log file "c:\builds\KDM_build.log". Unknown error "-1". 

Does anyone know what this means? I have not had this problem until today.


MSBuild deletes "Content"-folder after building it

$
0
0

I have an XNA4 project that I can build just fine with visual studio, but running MSBuild on the same solution file causes the Content-folder (containing newly built .xnb's) to disappear after it's built.

Any insight into what might be the issue here?

The build stopped unexpectedly because of an internal failure.

$
0
0
I,ve lookinf for for any solution, but i just spend two days and i dont hace success to reolve it, i just try to do is COMPILE the solution...  1.The HOTFIX theres no more available, 2. re install my VS2013 Professional, and many others... If someone please can help me how can resolvet It? this is the entire exception: 



"Error 1 The build stopped unexpectedly because of an internal failure. System.Text.EncoderFallbackException: Unable to translate Unicode character \uDEC1 at index 1017 to specified code page. at System.Text.EncoderExceptionFallbackBuffer.Fallback(Char charUnknown, Int32 index) at System.Text.EncoderFallbackBuffer.InternalFallback(Char ch, Char*& chars) at System.Text.UTF8Encoding.GetByteCount(Char* chars, Int32 count, EncoderNLS baseEncoder) at System.Text.UTF8Encoding.GetByteCount(String chars) at System.IO.BinaryWriter.Write(String value) at Microsoft.Build.BackEnd.NodePacketTranslator.NodePacketWriteTranslator.TranslateDictionary(Dictionary`2& dictionary, IEqualityComparer`1 comparer) at Microsoft.Build.Execution.BuildParameters.Microsoft.Build.BackEnd.INodePacketTranslatable.Translate(INodePacketTranslator translator) at Microsoft.Build.BackEnd.NodePacketTranslator.NodePacketWriteTranslator.Translate[T](T& value, NodePacketValueFactory`1 factory) at Microsoft.Build.BackEnd.NodeConfiguration.Translate(INodePacketTranslator translator) at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.NodeContext.SendData(INodePacket packet) at Microsoft.Build.BackEnd.NodeProviderOutOfProc.CreateNode(Int32 nodeId, INodePacketFactory factory, NodeConfiguration configuration) at Microsoft.Build.BackEnd.NodeManager.AttemptCreateNode(INodeProvider nodeProvider, NodeConfiguration nodeConfiguration) at Microsoft.Build.BackEnd.NodeManager.CreateNode(NodeConfiguration configuration, NodeAffinity nodeAffinity) at Microsoft.Build.Execution.BuildManager.PerformSchedulingActions(IEnumerable`1 responses) at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker) at Microsoft.Build.Execution.BuildManager.IssueRequestToScheduler(BuildSubmission submission, Boolean allowMainThreadBuild, BuildRequestBlocker blocker) "

...

Build failed in MSBuild

$
0
0

Hello,

I created a C++ MFC project and when configuring the build definition I kept the settings to default.

I received an error regarding these two files.

C:\Builds\1\TestFive\TestFiveAppTwo\Sources\D\Projects\TestFive\TestFiveApp\TestFiveApp\TestFiveApp.vcxproj (22)

: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

After doing some research I found reference to a work around and added this line to the build definition in the process tab under MSBuild Arguments:

/p:$(VCTargetsPath)="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.props"

Once I did this it appeared to resolve the issue related to “C:\Microsoft.Cpp.Default.props” However after that I no longer saw the issue related to C:\Builds\1\TestFive\TestFiveAppTwo\Sources\D\Projects\TestFive\TestFiveApp\TestFiveApp\TestFiveApp.vcxproj

Once I did the work around the issue for not finding this c:\build\1….  Disappeared and I only saw a vague error message

Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException)Exception Stack Trace:   at System.Activities.Statements.Throw.Execute(CodeActivityContext context)  at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)  at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

After fixing some Windows updates (KB2822241) (KB2998527), (KB2966827) and a code a code 800B0001 for a day I no longer needed the work around for C:\Microsoft.Cpp.Default.props”  and then was able to see the c:\build\1….   error again.

Without making any changes to the settings the error “C:\Microsoft.Cpp.Default.props” has reappeared a couple days later.

I went back to check for Windows Updates I get a code 800B0001 that was resolved by our IT but is now back again.

As a reference I created a simple C Sharp project that passes this portion and just has some warnings for an earlier part.

This appears to be failing at the “Get Impacted Tests, Index Sources and Publish Symbols. I unable to find what is generating the request for this file in the properties and options.

I can detailed log and or diagnostic log, or any other information that would assist resolving this issue.

Thank you,

Marla Manley

How to package a .Net dektop app installation so it can be downloaded

$
0
0
Okay, I looked through the forums and thought this would be a common questions, but I could not find the answer. Here is the issue. I have an setup.exe, which is an installation for a .Net Desktop application.  I would like end users to be able to go to a site and download the exe and install it.  The problem is that browsers and other security programs try to prevent it even though it is safe.  How do I package my exe so it is not subject to these security walls.  It is digitally signed by a third party but that only makes it look safe once it is already installing.  The problem is the download.  I have read some things about creating a self-extracting zip file, but it seems that would run into the same issues.  Any ideas would be appreciated.  Thank you in advance.

Make MSBuild test the COM registration and GAC to determine if a project is out-of-date

$
0
0

I have C++ project that builds a COM object. The postbuildstep - among other things - basically registers the COM object and creates and installs the interop assembly into the GAC:

regsvr32 /s "$(TargetPath).dll"
tlbgen ...
gacutil /i "$(TargetPath).interop.dll"

Now, I'd like MSBuild to test if the COM registration is intact and the interop assembly exists.
If not, then the project should become out-of-date and (at least) the postbuildstep should be executed.

I already figured out how to extract the type lib GUID from the IDL file and test if one important registry key is set:

<TypeLibGUID Condition="Exists('$(ProjectIncludeDir)\$(ProjectName).idl')">$([System.IO.File]::ReadAllText($(ProjectIncludeDir)\$(ProjectName).idl))</TypeLibGUID><TypeLibGUID>$([System.Text.RegularExpressions.Regex]::Match($(TypeLibGUID), `\[[^\]]+\]\s*library`))</TypeLibGUID><TypeLibGUID>$([System.Text.RegularExpressions.Regex]::Match($(TypeLibGUID), `uuid\([0-9A-F-]{36}\)`))</TypeLibGUID><TypeLibGUID>$([System.Text.RegularExpressions.Regex]::Match($(TypeLibGUID), `[0-9A-F-]{36}`))</TypeLibGUID><TypeLibRegistration>$([MSBuild]::GetRegistryValueFromView('HKEY_CLASSES_ROOT\TypeLib\{$(TypeLibGUID)}\1.0\0\win32', '', null, RegistryView.Registry64, RegistryView.Registry32))</TypeLibRegistration><IsTypeLibRegistered>false</IsTypeLibRegistered><IsTypeLibRegistered Condition="'$([System.Text.RegularExpressions.Regex]::Match($(TypeLibRegistration), `$(OutSubDir)\$(TargetName).dll`))' != ''">true</IsTypeLibRegistered>

But I have no clue how to modify MSBuilds behavior to check the project state.
Unfortunately, the "Diagnostic Output" of MSBuild does not help me if the project is up-to-date.
In that case, MSBuild does not tell me what it is doing prior to conluding that the project is "up-to-date" (i.e. what target outputs or files it has checked).

Should I define a target of some type? And where would I specify a dependency on that target?

Viewing all 2763 articles
Browse latest View live


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