ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reg:Error MSB8008: Specified platform toolset (v140) is not installed or invalid

22 REPLIES 22
SOLVED
Reply
Message 1 of 23
nathan307
16927 Views, 22 Replies

Reg:Error MSB8008: Specified platform toolset (v140) is not installed or invalid

Dear Friends,

 

I try to compile sample VC++ projects in the AutoCAD Plant 3D SDK(For 2017).
And I got an error MSB8008: Specified platform toolset (v140) is not installed or invalid.
I got this error for all (C++) samples of AutoCAD Plant 3D SDK(For 2017).
I am using Visual studio 2015.and Autocad P&ID 2017.

I try to change platform toolset to Visual Studio 2012 (v110) From .But the problem is not solved.

My current Platform toolset is Visual Studio 2015 (v140).Because im working with AutoCAD P&ID 2017.
How to solve this problem.please give your suggestion.

 

Note that:
I downloaded AutoCAD Plant 3D SDK(For 2017) From the below Link

http://www.autodesk.in/adsk/servlet/index?siteID=123112&id=15460551


Thank you Friends,
Nathan.

22 REPLIES 22
Message 2 of 23
tbrammer
in reply to: nathan307


nathan307 wrote: (...) And I got an error MSB8008: Specified platform toolset (v140) is not installed or invalid. (...)

I am using Visual studio 2015.and Autocad P&ID 2017.


Strange. Toolset v140 uses the VS 2015 compiler and tools. So it should work if you have VS 2015 installed.

Could it be a 64-bit issue? Do you have both 32-Bit and 64-Bit compilers and tools installed for VS 2015?

 

However: Changing the toolset is definitely _not_ a solution. You _must_ set it to v140 to target AutoCAD 2017.

 

Which version number does you VS2015 show? "VS2015 RTM" is the "officially supported" version. Although there are no problems reported yet with any update:

 

 RTM          14.0.23107.0 D14REL
 Update 1     14.0.24720.00
 Update 2     14.0.25123.00
 Update 3     14.0.25431.01

 


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Message 3 of 23
nathan307
in reply to: tbrammer

Dear Friend,


Thank you for your Quick reply.


The Problem Occurs in both 32bit and 64 bit compilation.
32-Bit and 64-Bit compilers and tools are installed for VS 2015 in my machine.
I am using the update 3 version of VS 2015.
This problem occurs for all c++ Sample Projects.

 

Please note that:
There is an another Common Error occurs in All c#.net Samples of Autocad P&ID 2017.
All the Projects Are compiled without any compilation errors. and there is no problem in NETLOAD.
But It shows an error while running commands as shown below(see the Attached Image Also).

Unhandled exception has occurred in a component in your application. If you click Continue, the application will ignore this error and attempt to continue.Could not load file or assembly 'PnP3dObjectsMgd, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null'....

 

I try to set copyLocal=false for the Reference Dlls,But the problem is not solve.

please give your suggestion to solve these problems.

 

Thank you Friends,

Nathan.

 

 

Message 4 of 23
tbrammer
in reply to: nathan307

Sounds like a general problem with the VS installation.

Does VS work well with other (C++) projects? I.e. with simple new project created from scratch.

I have no really well-grounded advice at this point. I would try to repair or re-install VS2015.


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Message 5 of 23
nathan307
in reply to: tbrammer

Dear Friend,

 

   The simple project and Other projects are working fine in VS.

 

   The problem occurs only in the Samples of Autocad P&ID 2017 SDK .

 

Thankyou Friend,

 Nathan

Message 6 of 23
tbrammer
in reply to: nathan307

And you are really working with VS2015? I get exactly the same error, when I

  • save a solution with VS2015 and toolset v140
  • open it with VS2012 or older and try to compile it

This happened to me just today when I opened a solution (.sln) by double-click in the windows explorer.


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Message 7 of 23

I can confirm the occurrence of this error with a sample P&ID\PnPScanValves 😞

It is look like a problem with PnPScanValves.vcxproj which was not updated since 2013 year.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 8 of 23


@nathan307 wrote:

...There is an another Common Error occurs in All c#.net Samples of Autocad P&ID 2017.
All the Projects Are compiled without any compilation errors. and there is no problem in NETLOAD.
But It shows an error while running commands as shown below(see the Attached Image Also).

Unhandled exception has occurred in a component in your application. If you click Continue, the application will ignore this error and attempt to continue.Could not load file or assembly 'PnP3dObjectsMgd, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null'....


Try this solution: PnP3dObjectsMgd not found exception

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 9 of 23

@nathan307

There is only one C++ sample in Plant 3D SDK: PnPScanValves

I've recreated its project file in order it compile/link without errors.

See attachment.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 10 of 23


Dear Friend,

Thank you for your suggestion.
I tried your suggestion,but not working.the same error occurs again.
I am using the CreatePipeLine Sample of Autocad P&ID 2017 SDK.
See the attached project.
Initialize() is not called at the time of NETLOAD.
(ie...) System.Windows.Forms.MessageBox.Show("StartUp up..."); is never shown.
Also I cant able to Attach to Process in Autocad P&ID 2017 C# Project.


I try with a simple sample Project.
Initialize is working fine in the my sample project,but attach to process is not working.
The error Could not load file or assembly 'PnP3dObjectsMgd also occured in my Sample project when i am trying to use the methods of PnP3dObjects dll.

My Sample code is shown below
[CommandMethod("Test")]
public static void Test()
{
System.Windows.Forms.MessageBox.Show("Command Started...");//This Message is not Shown
PartSizePropertiesCollection pspColl = new Autodesk.ProcessPower.PnP3dObjects.PartSizePropertiesCollection();//Error occurs because of this line
System.Windows.Forms.MessageBox.Show("Command Ended...");
}

 

Thank You Friend,

Nathan.

   

Message 11 of 23

What about replace line of code:

[assembly: Autodesk.AutoCAD.Runtime.ExtensionApplication(null)]

with

[assembly: Autodesk.AutoCAD.Runtime.ExtensionApplication(typeof(CreatePipeline.Program))]

???

 

And what about this C++ sample: https://forums.autodesk.com/autodesk/attachments/autodesk/34/34647/1/PnPScanValves.zip ???

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 12 of 23

Dear Friend,

 

Thank you For your Quick reply,

 

I replaced

 

      [assembly: Autodesk.AutoCAD.Runtime.ExtensionApplication(Null)]

 

with

 

    [assembly: Autodesk.AutoCAD.Runtime.ExtensionApplication(typeof(CreatePipeline.Program))]

   

The initialize is working fine now.

But The problem is not solved,Could not load file or assembly PnP3dObjectsMgd is Occurs at the time of Running CREATEPIPELINE Command.

I cant able to attach to process, so i cant find where the exception throws.

 

 

And I tried your C++ sample PnpScanValves project.

It shows an error message at the time of loading into VS as shown below.

One or more projects in the solution were not loaded correctly.
Please see the Output Window for details.

 

The Output window shows like :

D:\PnPScanValves\PnPScanValves.vcxproj(38,5): The imported project "D:\inc\rxsdk_Debugcfg.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

 

But I solved C++ sample problem by creating a new project and add the files into created project.Then it works fine.

 

I cant solve the Problem with the C# Samples,please give your suggestion to solve this.

 

Thank You Friend,

Nathan.

 

 

 

 

 

 

Message 13 of 23


@nathan307 wrote:

 

I cant solve the Problem with the C# Samples,please give your suggestion to solve this.

 

Thank You Friend,

Nathan.

 


Last attempt. In Initialize method add line:
Assembly.LoadFrom(assemblyPath)
where assemblyPath is a string with full path to PnP3dObjectsMgd.dll

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 14 of 23


@nathan307 wrote:
...And I tried your C++ sample PnpScanValves project.

It shows an error message at the time of loading into VS as shown below.

One or more projects in the solution were not loaded correctly.
Please see the Output Window for details.

 

The Output window shows like :

D:\PnPScanValves\PnPScanValves.vcxproj(38,5): The imported project "D:\inc\rxsdk_Debugcfg.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.


Because my sample has to be extracted exactly to the same place as Plant 3D SDK sample PnPScanValves, e.g. replace it.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 15 of 23


Dear Friend,
I tried Assembly.LoadFrom(assemblyPath);,but the dll is not loaded.
The code is shown below,

System.Windows.Forms.MessageBox.Show("StartUp up...");
string assemblyPath = "D:\\ObjectARX PID 2017\\inc-x64\\PnP3dObjectsMgd.dll";
System.Windows.Forms.MessageBox.Show(assemblyPath);
Assembly assembly = Assembly.LoadFrom(assemblyPath);
System.Windows.Forms.MessageBox.Show(assembly.FullName);

The Second Message Box is not Shown,because of Exception occurs in Assembly assembly = Assembly.LoadFrom(assemblyPath);
I used try and catch to find the exception,The exception shows like Could not load file or assembly 'PnP3dObjectsMgd.dll' or one of its dependencies.

Also I am try to Load CreatePipeLine Sample of Autocad P&ID 2016 SDK into Autocad P&ID 2016,The same problem occurs.

Then I try to load PnP3dObjectsMgd.dll in Simple C++ project using LoadLibrary method.
It shows the errorno=126.
Then I try to run The Following Commnd in CommndPrompt
C:\Windows\System32\ copy atio6axx.dll .dll
It Shows An Error like the system cannot find the file specified(See the Attached File).
Please give your Suggestion to Solve this.

And I have a Doubt, Is PnP3dObjectsMgd.dll of Autocad P&ID 2017 SDK is Loaded without any problem in your Projects.

Thank You Friend,
Nathan.

Message 16 of 23

Dear Friend,

 

I replace the PnPScanValves project with your PnPScanValves Project.The Project is loaded Fine now.
And It Shows a compilation Error Like the following
error C2338: /RTCc rejects conformant code, so it isn't supported by the C++ Standard Library.
Either remove this compiler option, or define _ALLOW_RTCc_IN_STL to acknowledge that you have received this warning.

 

 

Please Note That,

I already solved C++ Sample Problem by Creating New project and Adding PnPScanValves projects file into the newly created project.


Thank You Friend.
Nathan.

Message 17 of 23

Oh my God!!!

Instead of:

 

string assemblyPath = "D:\\ObjectARX PID 2017\\inc-x64\\PnP3dObjectsMgd.dll";

set path to PnP3dObjectsMgd.dll from AutoCAD Plant 3D 2017 directory. I have not installed Plant 3D, but think it will be (recheck this path):

 

string assemblyPath = "C:\\Program Files\\Autodesk\\AutoCAD 2017\\PLNT3D\\PnP3dObjectsMgd.dll"

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 18 of 23

Dear Friend,

 

   Its My mistake,I Insatalled Autocad P&ID 2017 and try to load CreatePipeline Sample in Autocad P&ID 2017.

   I am  not Install Autocad PLANT3D 2017.This Is the problem.

   Now I Install the Autocad PLANT3D 2017 and  load the CreatePipeline Sample,It Works fine now.

  

ThankYou Friend,

Nathan.

Message 19 of 23

Dear Friend,

 

Create Pipeline C# .net Sample Is working fine now.

In C++ I am trying to select a Pipe From current drawing and read properties from it.
But there is Error shows like below while i trying to use AcPpDb3dPipe Class.


Error:
LNK2019: unresolved external symbol "public: static class AcRxClass * __cdecl AcPpDb3dPipe::desc(void)"
see the code given below

AcDbObjectPointer<AcDbEntity>pEntity(idEnt, AcDb::kForRead);
if (pEntity.openStatus() != Acad::eOk)
{
return;
}
if (!pEntity->isKindOf(AcPpDb3dPipe::desc()))
{
return;
}
AcPpDb3dPipe* pPipe = AcPpDb3dPipe::cast(pEntity);

 

Note that: I Included #include"AcPpDb3dPipe.h" File.

Please give your suggestion to solve this,


ThanKyou Friend,
Nathan

 

 

Message 20 of 23

You have to link with PnIDObjects.lib

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report