There is a mismatch error - with x86 on - more trouble with VS
Posted: Tue Sep 12, 2017 4:57 pm
This is actually a copy from what I posted in the NG, Chris' reaction (as always very fast) and what happened then in VS.
I get this error:
C:Program Files
(x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(1820,5):
warning MSB3270: There was a mismatch between the processor
architecture of the project being built "MSIL" and the processor
architecture of the reference "VulcanDBFCDX, Version=4.0.401.0,
Culture=neutral, PublicKeyToken=0e73a8bf006af00c", "x86". This
mismatch may cause runtime failures. Please consider changing the
targeted processor architecture of your project through the
Configuration Manager so as to align the processor architectures
between your project and references, or take a dependency on
references with a processor architecture that matches the targeted
processor architecture of your project.
In earlier cases, with this error, I could go to Project Properties,
select the Build tab to the left and then set the "Platform Target"
option to the right to x86.
Which I did in this project. But this error seems to be related to the
Vulcan DLL.
I have created a reference to Vulcan 4 libs but the same happens when
I would select Vulcan 3 libs.
How can this be solved?
=========================================================
Chris replied:
>Hi Dick,
>
>Yes, the message is related to the platform target, I suspect you have
>set it to x86 for the Debug configuration, but you are building in
>Release configuration, or the opposite. Just make sure you have both set
>to x86 and the message will go away.
My reply
This is one of the reasons I hate VS. In the toolbar above my project I can select Debug /x86 and Release/x86, from a listview. I did do that already (x86).
I can also select Configuration Manager which opens the same windows as when you select Properties from the Solution. There it still says Any CPU. Why, I wonder...Ok, I change that to Platform Active(x86) but in Configuration Properties it still says Any CPU for the 3 projects in my solution. Why, I wonder for the 2nd time. But I can edit that although x86 is not part of the options. I have to click New from the listbox where it also shows Any CPU and Edit. I click New and now I can select x86 from the listbox New platform. And also Copy settings from Any CPU.
I of course have no idea what I am doing.
I can repeat that trick twice but for the 3rd project (a C# project but that may be because it's just the 3rd project in the list) in the solution I get the following error:
This platform could not be created because a solution platform of the same name already exists.
So I leave the C# project in the solution in the Cofiguration Manager on Any CPU. At this moment the first project, also a C# project shows x86. The X# project shows Any CPU and I change that form the list box. I click Apply. I do the same for the Release configuration. I go back to the debug configuration. The just changed project shows Any CPU, only the first shows x86. I enter x86. It doesn't stay that way.
I rebuilt the solution. Now I get 18 errors starting with
Severity Code Description Project File Line Suppression State
Error XS0006 Metadata file 'D:XSharpProjectsIC2ExtLibForVOIC2CSMethodsbinx86DebugIC2CSMethods.dll' could not be found IC2ExtLibForVO XSC 1
for the CSharp project which I changed. Plus a lot of The tpe or namespace can not be found errors. VS has no clue anymore of what is in the solution.
Clean solution does not help. Put back everything to Any CPU. Clean. Restart. The 18 errors remain. No idea why.
Did I tell you I hate VS?
I think I have to start over from scratch and copy code; this is usually quicker than trying to solve a VS problem.
Hopefully the then restored project works without x86 set because trying to change anything except (most of the times it is) only code in VS is more devastating to a VS project integrity than anything you could think of in VO 1.0. Or most likely: I think the alpha version of VO 1.0 was more stable than any VS version.
Did I tell you I hate VS?
Oh yes, I did ...
Dick
I get this error:
C:Program Files
(x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(1820,5):
warning MSB3270: There was a mismatch between the processor
architecture of the project being built "MSIL" and the processor
architecture of the reference "VulcanDBFCDX, Version=4.0.401.0,
Culture=neutral, PublicKeyToken=0e73a8bf006af00c", "x86". This
mismatch may cause runtime failures. Please consider changing the
targeted processor architecture of your project through the
Configuration Manager so as to align the processor architectures
between your project and references, or take a dependency on
references with a processor architecture that matches the targeted
processor architecture of your project.
In earlier cases, with this error, I could go to Project Properties,
select the Build tab to the left and then set the "Platform Target"
option to the right to x86.
Which I did in this project. But this error seems to be related to the
Vulcan DLL.
I have created a reference to Vulcan 4 libs but the same happens when
I would select Vulcan 3 libs.
How can this be solved?
=========================================================
Chris replied:
>Hi Dick,
>
>Yes, the message is related to the platform target, I suspect you have
>set it to x86 for the Debug configuration, but you are building in
>Release configuration, or the opposite. Just make sure you have both set
>to x86 and the message will go away.
My reply
This is one of the reasons I hate VS. In the toolbar above my project I can select Debug /x86 and Release/x86, from a listview. I did do that already (x86).
I can also select Configuration Manager which opens the same windows as when you select Properties from the Solution. There it still says Any CPU. Why, I wonder...Ok, I change that to Platform Active(x86) but in Configuration Properties it still says Any CPU for the 3 projects in my solution. Why, I wonder for the 2nd time. But I can edit that although x86 is not part of the options. I have to click New from the listbox where it also shows Any CPU and Edit. I click New and now I can select x86 from the listbox New platform. And also Copy settings from Any CPU.
I of course have no idea what I am doing.
I can repeat that trick twice but for the 3rd project (a C# project but that may be because it's just the 3rd project in the list) in the solution I get the following error:
This platform could not be created because a solution platform of the same name already exists.
So I leave the C# project in the solution in the Cofiguration Manager on Any CPU. At this moment the first project, also a C# project shows x86. The X# project shows Any CPU and I change that form the list box. I click Apply. I do the same for the Release configuration. I go back to the debug configuration. The just changed project shows Any CPU, only the first shows x86. I enter x86. It doesn't stay that way.
I rebuilt the solution. Now I get 18 errors starting with
Severity Code Description Project File Line Suppression State
Error XS0006 Metadata file 'D:XSharpProjectsIC2ExtLibForVOIC2CSMethodsbinx86DebugIC2CSMethods.dll' could not be found IC2ExtLibForVO XSC 1
for the CSharp project which I changed. Plus a lot of The tpe or namespace can not be found errors. VS has no clue anymore of what is in the solution.
Clean solution does not help. Put back everything to Any CPU. Clean. Restart. The 18 errors remain. No idea why.
Did I tell you I hate VS?
I think I have to start over from scratch and copy code; this is usually quicker than trying to solve a VS problem.
Hopefully the then restored project works without x86 set because trying to change anything except (most of the times it is) only code in VS is more devastating to a VS project integrity than anything you could think of in VO 1.0. Or most likely: I think the alpha version of VO 1.0 was more stable than any VS version.
Did I tell you I hate VS?
Oh yes, I did ...
Dick