Installing YetaWF for ASP.NET 4
YetaWF uses ASP.NET 4. Visual Studio 2015, 2017 or 2019 is required, we always use the most current version.
Installing Visual Studio 2015/2017/2019
Visual Studio 2015, 2017 or 2019 is required to build YetaWF with ASP.NET 4.
In order to clone the Git repository you'll need the Git Windows tools. If these are not present on your development system you can install them from https://git-for-windows.github.io/.
YetaWF uses TypeScript. Although not required, for proper IntelliSense and "Compile On Save" support, TypeScript for Visual Studio must be installed. It can be downloaded and installed from https://www.microsoft.com/en-us/download/details.aspx?id=48593.
YetaWF was tested with nodejs 10.15.3 LTS, gulp >4.
Gulp is used for the build pipeline. Gulp can be installed from the command line:
npm install -g gulp
It also requires the latest version of gulp-cli.
npm install gulp-cli --global
Bower is used for the Kendo UI Core package. Bower can be installed from the command line:
npm install -g bower
VS 2015/2017 External Tools Paths
Visual Studio 2015/2017 installs an older version of npm which can conflict with the latest version, which is needed for YetaWF.
Using Visual Studio 2015/2017, open the Options dialog using the menu > Tools > Options. Select External Web Tools, part of the Projects and Solutions section.
Move the $(PATH) entry ahead of $(VSINSTALLDIR)\Web\External and any other entries referencing $(VSINSTALLDIR).
Clone The YetaWF Depot
Open a Windows Command Prompt and create an appropriate folder on your development system. Then make the new folder the current directory:
Clone the YetaWF Solution repository (make sure to include the trailing period in the clone statement to indicate the current folder) and retrieve all the required submodules:
git clone --recursive https://github.com/YetaWF/YetaWF-Solution .
The above executes the following statements so you don't have to enter them manually.
Utilities\ProjectSettings\bin\Softelvdm.ProjectSettings.exe SetMVC5 Symlinks
cmd /c npm install
cmd /c npm rebuild node-sass
cmd /c bower install
Opening The Solution
Once the repository has been cloned and all steps completed, the solution file can be opened using Visual Studio. The solution file is named YetaWFDist4.com.sln.
Do not run the web project until after deciding whether to use files or a SQL DB below.
Rebuild all (make sure that the Nuget Package Manager is set to automatically download missing packages) to build your new site. Please be patient while all packages are restored (there is little visual feedback).
Files Or SQL DB
The default installation can run as-is and will create data files. This is intended for use with small sites (few pages or users) and for initial testing.
If you want to use files for data storage, you're ready to run the Website project. This will start your new website. Otherwise, for large scale use, it is recommended to use a SQL database to store all site data.
In order to use a SQL database, the connection string has to be specified in the AppSettings.json file.
The SQL DB is defined in AppSettings.json (located in folder .\Website\Data).
First, in the "Default" section, change the IOMode setting to "SQL".
Then add the connection string, by removing "notused_" (part of the SQLDbo and SQLConnect keys) and provide the connection string ("Data Source= ....").
. . .
"notused_SQLConnect": "Data Source=....;Initial Catalog=....;User ID=username;Password=password",
. . .
AppSettings.json shown with connection string ("Data Source=") which you would provide.
. . .
"IOMode": "SQL", <<<<<< CHANGED
"SQLDbo": "dbo", <<<<<< CHANGED
"SQLConnect": "Data Source=yoursource;Initial Catalog=yourcatalog;User ID=yourusername;Password=yourpassword", <<<<<< CHANGED
. . .
The DB itself has to be created in SQL (usually with SQL Server Management Studio). Once the DB has been created, the site can be rebuilt and started. All tables will be created automatically during site startup.
Running The Web Project
When you open your Visual Studio solution for the very first time, please wait a moment until all project references are downloaded and resolved. If you start a build too early, the build will fail (this appears to be a bug in VS 2017). If this happens, simply "Rebuild All" again.
For first time startup of the site, make sure to build a Debug build (but don't run the debugger when starting the site).
Once all of the above steps have been completed, the Website project can be started (using F5). It is the default project of the solution.
As the site starts up, it will guide you through the initial installation.
Tools & Templates
There are several C# Visual Studio templates available to create new packages, modules and skins. These can optionally be installed using the YetaWF Tools & Templates installer.