3DS Max Plugin Wizard with Visual Studio 2017 - visual-studio

I'm trying to set up the 3DS max Plugin wizard with my Visual Studio 2017.
Ofc i followed all the needed instructions, i set up the new absolute path directory, i made all files to be written on and not read only.
I can see the create a 3ds max plugin project in my visual studio, but when i click create projects, it just doesnt do anything and pops up back again to create a project.
I's there anyone out there who knows a possible solve?
Is the 3ds max SDK not compatible with the 2017 version?

With 3ds Max 2019 and Visual Studio Community 2017, these steps worked for me:
From folder <maxsdk>\howto\3dsmaxPluginWizard, open 3dsmaxPluginWizard.vsz in a text editor
Change line starting with Wizard= to Wizard=VsWizard.VsWizardEngine.15.0. This might be the step you were missing.
Change line starting with Param="ABSOLUTE_PATH = to give the full absolute path of the folder <maxsdk>\howto\3dsmaxPluginWizard
Copy 3dsmaxPluginWizard.ico, 3dsmaxPluginWizard.ico and 3dsmaxPluginWizard.vsz to C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\vcprojects
Platform Toolset: After creating the project, make sure to change the setting Configuration Properties->General->Platform Toolset to Visual Studio 2015 (v140) at least for 3ds Max 2018 and 3ds Max 2019. The required Visual Studio versions for each 3ds Max version are listed on the help page here. To prevent this problem in the future, you could update the template by adding the following to \maxsdk\howto\3dsmaxPluginWizard\Templates\1033\root.vcxproj_template and replace v140 with the appropriate value as shown on the help page:
<PropertyGroup Label="Configuration" >
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
That's it! In Visual Studio 2017 select File->New->Project..., then (1) select the 3ds Max Plugin Wizard, enter a Name, Location and Solution name, click OK, then (2) for Plugin Type select any other, I've tested that Utility is working, then (3) for Plugin Details be sure to enter a plugin category and plugin description, which can be any text, then (4) for Plugin Details set paths for root folder and where you want the plugin to live and the install root folder. Project should be created and work fine. It's possible there are bugs with certain plugin types though.
Possible errors:
When creating a project, if you receive an error popup like Unable to read the project file with Name cannot begin with the '3' character, try again and fill all fields in the Project Details page of the wizard with the read absolute paths, like C:\Program Files\Autodesk\3ds Max 2018 SDK\maxsdk and 'C:\Program Files\Autodesk\3ds Max 2018'.
When building, if you receive an error like The imported project "somepath\3dsmax.general.project.settings.props" was not found, open the .vcxproj file in a text editor and fix the value enclosed in <MaxSDK> and </MaxSDK>. It should be the maxsdk location with subfolders for include, lib, samples, etc.
When building, if you receive an error like LINK : fatal error LNK1104: cannot open file 'bmm.lib' then make sure you are building in Release mode. Unless you have a 3ds Max Debug Build provided by the Autodesk Developer Network (ADN), then you will only have Release libraries available under maxsdk\lib\x64.

Related

rt_matrx.c(29): fatal error C1083: Unable to open include file: 'stdlib.h' : No such file or directory

I have an issue during the compilation of a Simulink model, the model worked since I had a change in my Windows professional account, now I can't compile it anymore, and the following error is appearing in the debug window of Simulink:
rt_matrx.c(29): fatal error C1083: Unable to open include file: 'stdlib.h' : No such file or directory
I saw a similar issue on the Mathworks forum, which was resolved by reinstalling MATLAB, I tried to do the same and it didn't work for me.
I checked if the environment variables on my new windows account are the same from the previous one, they didn't change.
I don't have admin rights so I asked to my IT service if I was able to access all the paths I use with MATLAB, and apparently it's not the problem here.
My theory is that there is maybe an issue with how MATLAB and Visual Studio are linked together, that or maybe it comes from how the path is defined.
I'm a little lost for this issue, I would be glad if someone could help me or at least guide me on the origin of my problem, thanks you in advance.
MATLAB version: 2020A
Compiler version: Visual Studio 2019
Hello everyone, for the people in need i found the solution of my problem, it came from two points :
The environment of Visual studio 2019 :
I use Visual Studio 2019 community to compile my projects on MATLAB and SIMULINK, and if you have MSVC and the SDK kits installed at the same time i can create conflicts within your compilation (You can find this specifics add-ons on Visual studio installer > Visual studio 2019 Community > modify > C++ Desktop development).
Be sure when you install VS2019 to only get the strict minimum of add-ons you need to do your project.
My access rights to the MATLAB and Visual studio folders :
Check if you have a total control of your project (Right click on the folder concerned > Properties > Security, choose your user profile and check your rights).
For my part it worked when i changed my access rights of C:\Program Files\MATLAB\R2020a (be sure you have time for that because it took one hour for me, maybe you can only change the right to "toolbox" and it could works but i'm not sure about that) and C:\ProgramData\Speedgoat\speedgoatlib\R2020a
If the last solution doesnt work check the access rights of the other folders that are concerned by Matlab and visual studio.

VS 2019 could not find SDK

I keep getting this error, I am trying to perform the unity MRTK tutorial for hololens 2. I did everything on the first page https://learn.microsoft.com/en-us/windows/mixed-reality/mr-learning-base-02. When I try and run it this error comes up. I have tried to install 10.0.19041.0 through windows but it always kicks to 19041.1 I have installed all the required components in visual studio.
Any help would be appreciated.
Error pic
Installed Vs individual components
Unity Build settings
The problem you met is a bug seemingly caused by vs installer. It happens when Visual Studio is not installed on driver C.
You can see it here:
https://developercommunity2.visualstudio.com/t/HoloLens-2-build-fails-if-Windows-sdk-is/1313568
There are many ways you could do to get through this.
Copy the folder [Windows Kit Root Dir]\10\Extension SDKs\WindowsMobile (For e.g., D:\Windows Kits\10\Extension SDKs\WindowsMobile) to C:\Program Files (x86)\Windows Kits\10\Extension SDKs\. Should solve all of the missing WindowMobile issues.
https://developercommunity.visualstudio.com/t/msb3774-could-not-find-sdk-windowsmobile-version10/402362#T-N474809
Delete the reference to the Mobile SDK in the vxcproj file.
https://stackoverflow.com/a/60600054/9522354
I tried the first method and it worked for me.
I have tried to install 10.0.19041.0 through windows but it always kicks to 19041.1
For how to modify the SDKReference version, you can try following step:
By referring Section 5 of Update your C#/VB projects to use the latest Universal Windows Platform
Right-click your existing project(YourProjectName(Universal Windows)) in solution explorer, then select Unload Project. After the project is unloaded, right-click the project file again and choose to edit the .vcxproj file.
Find "SDKReference" element and change the value of version from "10.0.19041.1" to your version like "10.0.19041.0".
<ItemGroup>
<SDKReference Include="WindowsMobile, Version=10.0.19041.1" />
</ItemGroup>
to
<ItemGroup>
<SDKReference Include="WindowsMobile, Version=10.0.19041.0" />
</ItemGroup>
Besides, since you are using HoloLens2, it is recommended to set the Architecture in the Unity Build Setting window to x64.

Review Solution Actions: Retarget Projects - how to suppress it?

The following dialog prompts me to upgrade the platform toolset and Windows SDK version of files generated for VS2017 when opening it in VS2019:
How can I suppress this and have the action being taken to be No Upgrade?
After all I can still opt to do that later on via the context menu when right clicking a project in the Solution Explorer:
devenv.com from Visual Studio 2019 has:
/Upgrade Upgrades the project or the solution and all projects in it.
A backup of these files will be created as appropriate. Please
see Help on 'Visual Studio Conversion Wizard' for more
information on the backup process.
... what I'd like is essentially the opposite, though. And I'd also like for that setting to persist.
Note: while the screenshots were taken with Visual Studio 2019, earlier Visual Studio versions (notably since 2012) show this behavior as these appear to be the ones to support multiple platform toolsets and Windows SDKs in parallel. Therefore I am also tagging visual-studio.
Searching the options I came up emptyhanded when looking for:
action
retarget
target
upgrade
sdk
platform
toolset
You can suppress this dialog per-project by editing the project file, ProjectName.vcxproj.
It is an XML file. You can edit it with any text editor. Inside the <Project> tag, add the following lines:
<PropertyGroup Label="Globals">
<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
</PropertyGroup>
Source: https://learn.microsoft.com/visualstudio/extensibility/visual-cpp-project-extensibility#disable-project-upgrade

Convert SharePoint 2010 Solution to 2013 and Visual Studio 2012

I am trying to convert a SharePoint 2010 solution (custom web parts, content types, lists, event receivers, etc.) developed in Visual Studio 2010 to SharePoint 2013 and Visual Studio 2012. When I open the project in VS 2012, it converts a couple of the project files but won't compile because of reference issues.
I copied the DLLs (mostly Microsoft.SharePoint..., although I needed to copy the Microsoft.Office.SecureStoreService.dll too) that were causing issues from my 2010 server to the 2013 server and fixed the references. However, the Microsoft.Office.SecureStoreService.dll still gives me compiler errors claiming "Error 203 The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)" when visual studio has no problem with the namespace and finds the SecureStoreProvider class inside it just fine.
I've also tried to change the target framework from 3.5 to 4 and only see "Install other frameworks..." in the target framework dropdown.
I'm sure that others have dealt with this, but have been unsuccessful in framing the right google search query. I'm relatively new to SharePoint in general and any help would be appreciated.
thanks,
Mike
I was able to get my solution upgraded from a 2010 project to 2013 using the following. Note that this will update your solution to use the new 2013 API. It is possible to update just the project file but still run in 2010 mode.
First edit your .csproj file (for c#).
Modify the target framework to this:
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
Add this a node for the office version, I put mine directly below the TargetFrameworkVersion tag
<TargetOfficeVersion>15.0</TargetOfficeVersion>
Update references
Reload the project and update your referenced assemblies. If you haven't specified a specific version they should already be referencing the v15 (SharePoint 2013) assemblies.
Do a find replace for 14.0.0.0 to 15.0.0.0. This updates any references on your pages, layouts, and master pages to the v15 assemblies.
Change calls
Change any calls to SPUtility.GetGenericSetupPath() to SPUtility.GetVersionedGenericSetupPath()
Check each file to do a check for any hive references. You'll need to add a /15/ to these. EG: _layouts/ to _layouts/15/
Open the package "folder" in visual studio then update the properties for that package to use version 15.
Clean up
Finally do a compile clean up any missed items. Deploy your solution and make sure to test thoroughly.

Removing all unused references from a project in Visual Studio projects

I just wondered if it possible within various Visual Studio versions to automatically remove all references from a project that were never been used?
In your answer, please specify which version of VS the solution applies to.
If you have Resharper (plugin) installed, you can access a feature that allows you to analyze used references via Solution Explorer > (right click) References > Optimize References...
http://www.jetbrains.com/resharper/webhelp/Refactorings__Remove_Unused_References.html
This feature does not correctly handle:
Dependency injected assemblies
Dynamically loaded assemblies (Assembly.LoadFile)
Native code assemblies loaded through interop
ActiveX controls (COM interop)
Other creative ways of loading assemblies
All you need is stone and bare knuckle then you can do it like a caveman.
Remove unused namespaces (for each class)
Run Debug build
Copy your executable and remaining namespace references to new location
Run the executable
Missing Reference DLL error will occur
Copy required DLL from Debug folder
Repeat 4-6
Gu Gu Ga Ga?
Throw your stone
You can also rely on your build tools to let you know which reference is still required. It's the era of VS 2017, caveman still survived.
The Resharper extension will do this for you.
This extension supports Visual Studio 2005 through 2017.
While the compiler won't include unused assemblies, extraneous using statements and references slows down Visual Studio and Intellisense, since there's more code the tools have to consider.
You can try the free VS2010 extension: Reference Assistant by Lardite group. It works perfectly for me. This tool helps to find unused references and allows you to choose which references should be removed.
In a Visual Basic project there is support to remove "Unused References" (Project-->References-->Unused References). In C# there isn´t such a function.
The only way to do it in a C# project (without other tools) is to remove possible unused assemblies, compile the project and verify if any errors occur during compilation. If none errors occur you have removed a unused assembly. (See my post)
If you want to know which project (assembly) depends on other assemblies you can use NDepend.
With Visual Studio versions 2017 and 2015, you can do this with the Code Map feature, but this feature is only available in the Enterprise Edition, not the Community or Professional versions.
Right-click on the project node in the solution explorer and select 'Show on Code Map.' This will display your .dll as a single node in a blank graph. Right-click on that node in the Code Map and select "Show Assemblies This References." This will add an additional node called "Externals" which can be expanded to show only the assemblies that are actually referenced.
For Visual Studio 2013/2015/2017 there is an extension that does exactly what you want: ResolveUR. What this basically does is:
reference is removed in the project
project is compiled with msbuild
check for build errors
restore removed references if there were build errors.
For anybody coming here looking for Visual studio 2012:
Download and Install Reference Assistant for Visual Studio 11
Later you can do:
In Visual Studio 2013 this extension works:
ResolveUR
Some people suggested to use an awesome tool - Reference Assistant for Visual Studio. The problem is that VS2012 is the latest supported Visual Studio. But there is the way to make it work in VS2013 as well ;)
And here is how:
1) Download Lardite.RefAssistant.11.0.vsix
2) Change the extension to zip: Lardite.RefAssistant.11.0.vsix -> Lardite.RefAssistant.11.0.zip
3) Unzip and open the extension.vsixmanifest file in the text editor
4) Find all occurences of InstallationTarget Version="[11.0,12.0)" and replace them with InstallationTarget Version="[11.0,12.0]" (note the closing bracket)
5) Save the file and zip all files so they are on the root zip level
6) Change the extension of the new zip to vsix
7) Install and enjoy :)
I've tested it with VS2013, thanks source for the tutorial
EDIT
Add to support VS 2015 Community Edition
<InstallationTarget Version="[14.0,15.0]" Id="Microsoft.VisualStudio.Community" />
Meaning of the brackets
[ – minimum version inclusive.
] – maximum version inclusive.
( – minimum version exclusive.
) – maximum version exclusive.
[Update] This feature is only available for .Net core projects.
This feature will be coming to Visual Studio 2019 very soon and already available with Visual Studio 2019 v16.10 Preview 1.
This option is turned off by default, but you can enable it under menu Tools > Options > Text Editor > C# > Advanced. Select the Remove Unused References command in Solution Explorer (Experimental). Once the option is enabled, the Remove Unused References command will appear in the right-click menu of a project name or dependencies node.
You can use Reference Assistant extension from the Visual Studio extension gallery.
Used and works for Visual Studio 2010.
In the VS2022 (preview at the moment of writing) this comes out of the box for SDK Style Projects (read: .NET Core and newer).
If it is available you can find it in the project context menu:
You get to choose what to do with each finding.
Read more about it here.
Pro-tip: Check if your project compiles and runs correctly after applying this. In my experience it doesn't check whether a dependency is used at runtime, for instance.
Using DevExpress, I follow these instructions:
In VS, go to DevExpress - Editor - Code Cleanup. Under Rules, check 'Remove unused namespace references'. Click OK.
Right-click on the solution, and choose 'Code Cleanup'. The cleanup runs for a few minutes, and finishes.
Build your application
The following method does not depend on any 'add-on's and is not very painful.
Step through each of your source files and
Select all (Ctrl-A)
Toggle outline expansion (Ctrl-M, M). This will reduce the file to two lines.
Click on the namespace's '+'. This will show each of the file's classes as a single line. Scan each class's reference count, looking for unreferenced classes.
Click on each of the classes' '+'. This will show each of the class functions as a single line. Scan each function's reference count, looking for unreferenced functions.
Scanning each file looking for '0 reference' takes only a second.
Scanning an entire project takes only a couple of minutes.
In VB2008, it works this way:
Project>Add References
Then click on the Recent tab where you can see list of references used recently. Locate the one you do not want and delet it. Then you close without adding anything.

Resources