Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Issue with projects starting to fail (Read 4821 times)
RonOhmer
Junior Member
**
Offline


Posts: 29
Joined: Feb 10th, 2015
Issue with projects starting to fail
Sep 12th, 2017 at 5:59pm
Print Post  
Ok, I have been using this project regularly, and all of a sudden on a compile I get the following:
Code
Select All
1>------ Build started: Project: CNCController, Configuration: Debug Win32 ------
1>C:\Program Files (x86)\Microsoft Visual 7,5): error MSB4018: The "VCMessage" task failed unexpectedly.
1>C:\Program Files (x86)\Microsoft Visual 7,5): error MSB4018: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
1>C:\Program Files (x86)\Microsoft Visual 7,5): error MSB4018:    at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
1>C:\Program Files (x86)\Microsoft Visual 7,5): error MSB4018:    at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
1>C:\Program Files (x86)\Microsoft Visual 7,5): error MSB4018:    at System.String.Format(IFormatProvider provider, String format, Object[] args)
1>C:\Program Files (x86)\Microsoft Visual 7,5): error MSB4018:    at Microsoft.Build.Shared.ResourceUtilities.FormatString(String unformatted, Object[] args)
1>C:\Program Files (x86)\Microsoft Visual 7,5): error MSB4018:    at Microsoft.Build.Utilities.TaskLoggingHelper.FormatString(String unformatted, Object[] args)
1>C:\Program Files (x86)\Microsoft Visual 7,5): error MSB4018:    at Microsoft.Build.Utilities.TaskLoggingHelper.FormatResourceString(String resourceName, Object[] args)
1>C:\Program Files (x86)\Microsoft Visual 7,5): error MSB4018:    at  messageResourceName, Object[] messageArgs)
1>C:\Program Files (x86)\Microsoft Visual 7,5): error MSB4018:    at Microsoft.Build.CPPTasks.VCMessage.Execute()
1>C:\Program Files (x86)\Microsoft Visual 7,5): error MSB4018:    at Host.Execute()
1>C:\Program Files (x86)\Microsoft Visual 7,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
1>Done building project "CNCController.vcxproj" -- FAILED. 



I have seen this happen before, but my fix was recreating the project.  Which I don't want to do.

Any suggestions?
« Last Edit: Sep 12th, 2017 at 10:09pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
RonOhmer
Junior Member
**
Offline


Posts: 29
Joined: Feb 10th, 2015
Re: Issue with projects starting to fail
Reply #1 - Sep 12th, 2017 at 7:37pm
Print Post  
A little more info.  The compiler does not recognize that its a VS project.  I have been all over the project file and cant find the issue.  

Here it is:
Code
Select All
<?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>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{C5F80730-F44F-4478-BDAE-6634EFC2CA88}</ProjectGuid>
    <RootNamespace>CNCController</RootNamespace>
    <ProjectName>CNCController</ProjectName>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>
    </PlatformToolset>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>
    </PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="Shared">
    <Import Project="..\TempLib\TempLib\TempLib.vcxitems" Label="Shared" />
    <Import Project="..\uWindows\uWindows.vcxitems" Label="Shared" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup />
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <SDLCheck>true</SDLCheck>
     ware\sam\1.6.11\libraries\SPI\src;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\iznu5qi1.uuf\Micro sam\1.6.11\system\libsam\include;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\iznu5qi1.uuf\Micro ;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\iznu5qi1.uuf\Micro \;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\iznu5qi1.uuf\Micro \4.4.1\include;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\iznu5qi1.uuf\Micro lIncludeDirectories>
     deFiles)</ForcedIncludeFiles>
      <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
     cessorDefinitions>
    </ClCompile>
    <Link>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
    </ClCompile>
    <Link>
      <GenerateDebugInformation>true</GenerateDebugInformation>
 

« Last Edit: Sep 12th, 2017 at 10:09pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Issue with projects starting to fail
Reply #2 - Sep 12th, 2017 at 10:11pm
Print Post  
Hi,

If the project, folder and an .ino do not share the same name then Visual Micro does not consider the project to be valid Arduino and leaves Visual Studio to attempt to do whatever it wants to do for the C++ project.

Have you renamed the main ino, the project or the folder? They must be the same.

Does this help?
  
Back to top
WWW  
IP Logged
 
RonOhmer
Junior Member
**
Offline


Posts: 29
Joined: Feb 10th, 2015
Re: Issue with projects starting to fail
Reply #3 - Sep 13th, 2017 at 1:01am
Print Post  
No, not that I know of.  I again recreated the project and am up and going.  I will keep that in mind tho for next time.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Issue with projects starting to fail
Reply #4 - Sep 13th, 2017 at 1:09am
Print Post  
It will be something "simple" in the end.

Another thing that will affect things is the "configuration" setting. Visual Micro does allow other non-arduino visual studio compilers to compile your code. If you change the configuration on the tool bar from win32 to x64 that might also cause Visual Micro to sleep allowing VS to attempt compile.

When you hit the problem take a look at the tool bar to see what the configuration combo box is set to.

fyi info

When allowed, Visual Studio attempts to compile the projects that are enabled in "Build>Configuration Manager". This system also allows you to exclude the project from the VS build process so then when you build you would not see the error.
  
Back to top
WWW  
IP Logged
 
RonOhmer
Junior Member
**
Offline


Posts: 29
Joined: Feb 10th, 2015
Re: Issue with projects starting to fail
Reply #5 - Sep 13th, 2017 at 2:52am
Print Post  
Yeah, I don't remember any of that changing.  This all happened today.  I added a few .h and .cpp, but nothing else.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Issue with projects starting to fail
Reply #6 - Sep 13th, 2017 at 3:10am
Print Post  
When you see the vs error it changes the selected output window. Change back to the Micro Output window and see if there is a visual micro error.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint