supermemo-wiki / SuperMemoAssistant.Wiki

Documentation resources
MIT License
3 stars 7 forks source link

A guide for new developers who want to build in VS #87

Open bjsi opened 4 years ago

bjsi commented 4 years ago

Currently building in VS is a bit tricky, particularly for people who aren't familiar with VS / C#.

I made some quick notes on problems me and wzonglin (discord) ran into while helping him get set up. @alexis- will probably need to confirm these, I may have made a mistake.

  1. Install dependencies (from sma.wiki). "you will need to install these: 7-zip to extract the files Visual C++ Redistributable 2012 x86 Visual C++ Redistributable 2015-2019 x86 .NET Framework (4.7.2) (Installed by default on Windows 10)"

You also need to download the latest version of Visual Studio (Community Edition is fine).

  1. Get the project from GitHub Important: When you clone from GitHub, make sure you include the submodules - basically run this command:

    git clone --recurse-submodules https://github.com/supermemo/SuperMemoAssistant
  2. To check that the submodules were cloned correctly, check the _Libs folder: image You should be able to load those projects. If they are greyed out, that's a sign something went wrong. You can confirm by right clicking on the _Libs folder and opening in windows explorer. If the submodule folders are empty, you need to rerun the git clone command, making sure to grab the submodules too.

  3. Change the output path for the build

In VS in the solution explorer you can search for "SuperMemoAssistant.csproj". Open the file and find the two lines where you specify the OutputPath. You will probably just need to change the username (blue lines.)

image

TODO... (will continue to update tomorrow)

joeycold commented 3 years ago

clone this project will face error. fatal: remote error: upload-pack: not our ref 7ba9711a56ce7528ee5a064fc0e33c58797ab024 Fetched in submodule path 'libs/PluginManager', but it did not contain 7ba9711a56ce7528ee5a064fc0e33c58797ab024. Direct fetching of that commit failed. How can I solve this?

alexis- commented 3 years ago

clone this project will face error. fatal: remote error: upload-pack: not our ref 7ba9711a56ce7528ee5a064fc0e33c58797ab024 Fetched in submodule path 'libs/PluginManager', but it did not contain 7ba9711a56ce7528ee5a064fc0e33c58797ab024. Direct fetching of that commit failed. How can I solve this?

The culprit repositories were updated.

1) Install VS 2019 with the following modules:

joeycold commented 3 years ago

Thanks! now I can clone this projects smoothly.and the step 1-3 is also done.but when I open this "SuperMemoAssistant.sln",I got this error:

Error NU1101 Unable to find package SuperMemoAssistant.Plugins.Import.BrowserNativeHost. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, MSBuild.Tools, nuget.org, PluginManager, SuperMemoAssistant-Alpha, SuperMemoAssistant.Installer, SuperMemoAssistant.Packages SuperMemoAssistant.Plugins.Import C:\Users\winfiles\sma\SuperMemoAssistant\src\Plugins\SuperMemoAssistant.Plugins.Import\src\SuperMemoAssistant.Plugins.Import\SuperMemoAssistant.Plugins.Import.csproj 1

BTW:I can't understand the first item in step 4,What mean "SuperMemoAssistant Visual studio projects"?