Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 3.00 average. Display Modes
  #1  
Old 05-06-2016, 02:46 AM
Wolfgang Wolfgang is offline
Registered User
 
Join Date: 12-02-2014
Posts: 4
Visual Build seems to pick up the wrong Visual Basic compiler

Hello Forum,

just moved to a new machine and a new version of Visual Studio (from 2013 to 2015) and upgraded from Visual Build 8 to Visual Build 9.2.
Still running on Windows 7 Pro 64 bit.

Having moved to a new version of VB.Net, I would like to use some of the nice new features, like the null propagation operator.
Building in VS 2015 works fine.
The code works, I can debug, etc...

But when I build using Visual Build I get errors, like:
error BC36637: The '?' character cannot be used here.

The project is a desktop project (WPF library) targeting the .Net framework 4.5.

I've searched a bit and found these two discussions:
http://stackoverflow.com/questions/3...al-studio-2015
http://stackoverflow.com/questions/3...al-studio-2015

Therefore I added <LangVersion>14</LangVersion> to the vbproj file.
But that generates a different error when building from Visual Build:
vbc : Command line error BC2014: the value '14' is invalid for option 'langversion'

When I set <LangVersion>11.0</LangVersion>, Visual Studio also shows
error BC36637: The '?' character cannot be used here
=> the <LangVersion> property works correctly.

I noticed that Visual Build calls...
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Vb c.exe

While the VS2015/VB.Net14 compiler is seemingly stored in:
c:\Program Files (x86)\MSBuild\14.0\Bin\Vbc.exe

So it looks to me as if Visual Build picks up the wrong VB compiler for building VS 2015 projects.

Any ideas how to work around this?

Thanks

Wolfgang

---
Windows 7 Pro, 64 bit
VS 2015 Community Edition
Desktop Project, .Net Framework 4.5
Visual Build 9.2
Reply With Quote
  #2  
Old 05-06-2016, 05:40 AM
Wolfgang Wolfgang is offline
Registered User
 
Join Date: 12-02-2014
Posts: 4
Workaround - use Run Program to run devenv.exe

Hi again,

the workaround which I'm now using is to run devenv.exe:
https://msdn.microsoft.com/en-us/library/b20w810z.aspx

I've modified the original build step to only update the project properties, inserted a step to clean the project, just to be sure, and inserted the 'Run Program' action.

Easier/better workarounds - or even a proper solution - are very welcome.

Nice weekend

Wolfgang
Reply With Quote
  #3  
Old 05-06-2016, 06:49 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
See the second paragraph of
http://kinook.com/Forum/showthread.php?t=4500
Reply With Quote
  #4  
Old 05-08-2016, 10:43 AM
Wolfgang Wolfgang is offline
Registered User
 
Join Date: 12-02-2014
Posts: 4
Thanks for the fast reply.

Specifying the exact MSBuild version solved my problem.

Regards

Wolfgang
Reply With Quote
Reply

Tags
vb.net 14 , visual build 9.2 , vs 2015


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 04:30 PM.


Copyright © 1999-2023 Kinook Software, Inc.