This version of the Ed-Fi ODS / API is no longer supported. See the Ed-Fi Technology Version Index for a link to the latest version.

 

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Preparing the development environment involves the following procedures (which are described below):

Configure MSBuild

Because packages compiled from some of the projects are used during the code generation of later projects, there is a potential for earlier packages to be locked if the solution is recompiled in rapid succession. This is due to the way that MSBuild caches build processes to minimize compile time by default. Build processes are normally held for reuse for approximately 10 minutes.To turn off this default behavior when compiling in Visual Studio, the MSBuildDisableNodeReuse variable must be set. There are two options for setting this variable:
  • Setting the variable globally
  • Setting the variable per command prompt session
Both options instruct the compiler to create a new process for each build job. As a side effect, this action also releases any resources that may be held by inactive compiler processes.If these settings are not applied, Visual Studio or MSBuild may lock resources during build. Restarting Visual Studio (or the command prompt session) will resolve the problem for the first build after the restart. Waiting for up to 15 minutes between builds will also achieve this.The options for setting this variable are described below.

Set MSBuildDisableNodeReuse Globally

To set the MSBuildDisableNodeReuse variable globally use the “Environment Variables” property page, which is accessed by right-clicking Computer, clicking Properties, and clicking the “Environment Variables” button under the “System Properties” dialog window Advanced tab.

To turn off this behavior when compiling the solution using MSBuild, include the following compiler flag:

 

 /nr:false

 

 

Set MSBuildDisableNodeReuse per Command Prompt Session

If the MSBuildDisableNodeReuse variable is set within a command prompt session, the Visual Studio development environment must be launched using the devenv command (rather than from an icon):

 SET MSBUILDDISABLENODEREUSE=1



Verify PowerShell Script Permissions
You may need to change the execution policy for unsigned PowerShell scripts to run on your machine to run the scripts. This may be accomplished by opening a powershell console as administrator and typing the following command.

 

Initialize PowerShell Scripts for DevelopmentThere are several databases that must be successfully deployed. PowerShell scripts that initialize all necessary development databases are included in the Visual Studio solution.These scripts are enabled for use within Visual Studio when the Ed-Fi-ODS solution is opened.2 They may also be loaded for use within a PowerShell console window3 by running the initialize PowerShell for development script4 located at:

 
If you are in the C:\Ed-Fi-ODS-Implementation directory, PowerShell will auto-complete the script for you if you type "Init" and then press Tab.

In either case, when the scripts are loaded, you should see the results shown below.

 
The script may not finish with a command prompt when it is automatically loaded with the solution in Visual Studio in some circumstances. Simply press Enter and ignore any messages that appear in the console window.

Initialize the Development EnvironmentOnce the PowerShell development scripts have been loaded and a development certificate has been installed, the development environment may be initialized by typing the initdev command in a PowerShell console. This command creates databases, generates code templates, and compiles projects in the solution.

 
Initializing the development environment will take several minutes to complete. Some developers report encountering an error during the initialization process the first time it is run. This is due to an intermittent timing issue. The issue generally resolves itself when the initdev process is run a second time.

 


When starting Visual Studio, it is recommended that you “Run as administrator.”
To Initialize the Development Environment within Visual Studio, you must close and reopen the solution after restoring the NuGet packages. When starting a PowerShell session, it is recommended that you “Run as administrator.” In particular, installing a certificate usually requires elevated privileges.

In order to run the scripts from a PowerShell console, the solution must be loaded at least once from Visual Studio in order to retrieve the required NuGet packages – as described in an earlier step. 

Downloads

The following link is a ZIP archive containing the SQL script file referenced in the step "Create SQL Logins"

SQL Script: CreateLocalLogins.zip

  • No labels