Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3dc48ab
Updated application- and class library project files to reflect how s…
per-samuelsson Mar 13, 2017
8596c68
Made application- and class library project templates specify Starcou…
per-samuelsson Mar 14, 2017
73b506b
Bumped version of extension for 2.4 / develop to 2.0.0-RC1
per-samuelsson Mar 14, 2017
e4612de
Merge branch 'master' into issue/1
per-samuelsson Mar 15, 2017
7370339
Updated version of VSIX package and description of that and NuGet pac…
per-samuelsson Mar 15, 2017
6d68e13
Merge branch 'issue/1' into develop, implementing #1.
per-samuelsson Mar 15, 2017
a580324
Update README.md
per-samuelsson Mar 15, 2017
75669dc
Update README.md
per-samuelsson Mar 15, 2017
eea54bc
Added a new Starcounter Template
Feyrious Mar 20, 2017
27f5ff0
Removed interface and changed to static classes
Feyrious Mar 21, 2017
b482956
Removed the Ontology hook class due to it being deprecate
Feyrious Mar 21, 2017
64d2506
Changed the name of the database and updated the names on its properties
Feyrious Mar 21, 2017
5a0e6b0
Updated some names and change how how the front-end is updated
Feyrious Mar 21, 2017
5211c67
Project and template file changes
Feyrious Mar 21, 2017
cb90d7d
Changed folder name to reflect its content better
Feyrious Mar 21, 2017
33a7754
Taged as changed due to folder name change
Feyrious Mar 21, 2017
9280dea
Changed page name
Feyrious Mar 21, 2017
34ed1e4
Code cleanup
Feyrious Mar 21, 2017
5106cac
Fixed so that the folder in wwwroot now follows the project name
Feyrious Mar 21, 2017
f0da055
Merge branch 'master' into boilerplate-template
Feyrious Mar 21, 2017
19046fd
Fixed so that wwwroot folder now follow application name and set a sa…
Feyrious Mar 21, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ A Visual Studio extension that assist in development and debugging of Starcounte
# Build
Build `src\Starcounter.VisualStudio.sln`.

# Install / uninstall locally
After building, go to `bin\[Configuration]\`. Double-click `Starcounter.VS.vsix`.

# Pack
The package version is maintained in `build\version.txt`.

Expand All @@ -15,8 +18,8 @@ cd pack

A new package will be created in `artifacts\`.

# Pushing to nuget.org
The package version is maintained in `build\version.txt`. Make sure to increase that (and commit) before publishing a new version upstream.
# Publishing to nuget.org
The package version is maintained in `build\version.txt`. Make sure to increase that (and commit) before publishing a new version upstream. Also keep that version in sync with the VS package version in `src\Starcounter.VS.VSIX\source.extension.vsixmanifest`. The version is on the `PackageManifest\Metadata\Identity` element.

```
cd build
Expand All @@ -25,10 +28,13 @@ cd pack_and_push

You will need to make sure the Starcounter API key with proper access rights is available through `%StarcounterNuGetKeyFull%`, or pushing will fail.

# Install / uninstall locally
After building, go to `bin\[Configuration]\`. Double-click `Starcounter.VS.vsix`.
# Publishing on Visual Studio marketplace
1. Go to https://marketplace.visualstudio.com/items?itemName=Starcounter.StarcounterforVisualStudio
2. Choose `Edit extension`
3. Use `Upload | Change` to upload a new version.

# Resources
* Home on [Visual Studio marketplace]( https://marketplace.visualstudio.com/items?itemName=Starcounter.StarcounterforVisualStudio).
* Home on [Visual Studio marketplace](https://marketplace.visualstudio.com/items?itemName=Starcounter.StarcounterforVisualStudio).
* Home for package on [nuget.org](https://www.nuget.org/packages/Starcounter.VisualStudio/).

* [Version compatibility](https://github.com/Starcounter/Starcounter.VisualStudio/wiki/Version-compatibility)
* [Development cheat sheet](https://github.com/Starcounter/Starcounter.VisualStudio/wiki/Development-cheat-sheet)
2 changes: 1 addition & 1 deletion build/Starcounter.VisualStudio.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<owners>Starcounter</owners>
<projectUrl>https://github.com/Starcounter/Starcounter.VisualStudio</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Starcounter Visual Studio extension wrapped up in a NuGet package. Use this version for Starcounter versions up until, and including, 2.3.x.</description>
<description>Starcounter Visual Studio extension wrapped up in a NuGet package. Use this version for Starcounter versions 2.4.x and higher.</description>
<tags>Starcounter VisualStudio</tags>
</metadata>
<files>
Expand Down
2 changes: 1 addition & 1 deletion build/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.4
1.0.4
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Starcounter, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d2df1e81d0ca3abf" >
<Private>False</Private>
</Reference>
<Reference Include="Starcounter, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d2df1e81d0ca3abf" >
<Private>True</Private>
</Reference>
<Reference Include="Starcounter.Hosting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d2df1e81d0ca3abf" >
<Private>True</Private>
</Reference>
<Reference Include="Starcounter.Internal, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d2df1e81d0ca3abf" >
<Private>False</Private>
</Reference>
<Reference Include="Starcounter.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d2df1e81d0ca3abf" >
<Private>False</Private>
</Reference>
<Private>True</Private>
</Reference>
<Reference Include="Starcounter.XSON, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d2df1e81d0ca3abf" >
<Private>False</Private>
</Reference>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
Expand All @@ -74,4 +74,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace $safeprojectname$.Api
{
internal static class CommitHooks
{
public static void Register()
{

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using $safeprojectname$.ViewModels;
using Starcounter;

namespace $safeprojectname$.Api
{
internal static class MainHandlers
{
public static void Register()
{
Application.Current.Use(new HtmlFromJsonProvider());
Application.Current.Use(new PartialToStandaloneHtmlProvider());

Handle.GET("/$safeprojectname$", () =>
{
var page = new MainPage()
{
Visitors =
{
Data = Db.SQL<GuestBookEntry>("SELECT g FROM GuestBookEntry g")
}
};

if (Session.Current == null)
{
Session.Current = new Session(SessionOptions.PatchVersioning);
}

page.Session = Session.Current;

return page;
});
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace $safeprojectname$.Api
{
internal static class PartialHandlers
{
public static void Register()
{

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using Starcounter;

namespace $safeprojectname$
{
[Database]
public class GuestBookEntry
{
public string VisitorName { get; set; }
public string DateVisited { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProductVersion>9.0.20706</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectTypeGuids>{C86118D7-451E-4933-BFEE-A1EFDB162FD7};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{$guid1$}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>$safeprojectname$</RootNamespace>
<AssemblyName>$safeprojectname$</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<UseVSHostingProcess>false</UseVSHostingProcess>
<StartWorkingDirectory>$(MSBuildProjectDirectory)</StartWorkingDirectory>
<StarcounterVersionCompatibility>2.3</StarcounterVersionCompatibility>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Starcounter, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d2df1e81d0ca3abf">
<Private>False</Private>
</Reference>
<Reference Include="Starcounter.Internal, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d2df1e81d0ca3abf">
<Private>False</Private>
</Reference>
<Reference Include="Starcounter.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d2df1e81d0ca3abf">
<Private>False</Private>
</Reference>
<Reference Include="Starcounter.XSON, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d2df1e81d0ca3abf">
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Api\CommitHooks.cs" />
<Compile Include="Database\GuestBookEntry.cs" />
<Compile Include="Api\MainHandlers.cs" />
<Compile Include="Api\PartialHandlers.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ViewModels\MainPage.json.cs">
<DependentUpon>MainPage.json</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Folder Include="Helpers\" />
<Folder Include="wwwroot\HelloStarcounter\css\" />
<Folder Include="wwwroot\HelloStarcounter\js\" />
</ItemGroup>
<ItemGroup>
<TypedJSON Include="ViewModels\MainPage.json">
<Generator>MsBuild:Compile</Generator>
</TypedJSON>
</ItemGroup>
<ItemGroup>
<None Include="wwwroot\HelloStarcounter\viewmodels\MainPage.html" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(StarcounterBin)\Starcounter.MsBuild.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
<TemplateData>
<Name>Basic Starcounter Application</Name>
<Description>A basic Starcounter project for creating a C# application that executes inside Starcounter</Description>
<ProjectType>CSharp</ProjectType>
<ProjectSubType>
</ProjectSubType>
<SortOrder>1000</SortOrder>
<CreateNewFolder>true</CreateNewFolder>
<DefaultName>StarcounterApplication</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<LocationField>Enabled</LocationField>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
<Icon>__TemplateIcon.ico</Icon>
</TemplateData>
<TemplateContent>
<Project TargetFileName="HelloStarcounter.csproj" File="HelloStarcounter.csproj" ReplaceParameters="true">
<Folder Name="Api" TargetFolderName="Api">
<ProjectItem ReplaceParameters="true" TargetFileName="CommitHooks.cs">CommitHooks.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="MainHandlers.cs">MainHandlers.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="PartialHandlers.cs">PartialHandlers.cs</ProjectItem>
</Folder>
<Folder Name="Database" TargetFolderName="Database">
<ProjectItem ReplaceParameters="true" TargetFileName="GuestBookEntry.cs">GuestBookEntry.cs</ProjectItem>
</Folder>
<Folder Name="Helpers" TargetFolderName="Helpers" />
<ProjectItem ReplaceParameters="true" TargetFileName="Program.cs">Program.cs</ProjectItem>
<Folder Name="Properties" TargetFolderName="Properties">
<ProjectItem ReplaceParameters="true" TargetFileName="AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem>
</Folder>
<Folder Name="ViewModels" TargetFolderName="ViewModels">
<ProjectItem ReplaceParameters="true" TargetFileName="MainPage.json">MainPage.json</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="MainPage.json.cs">MainPage.json.cs</ProjectItem>
</Folder>
<Folder Name="wwwroot" TargetFolderName="wwwroot">
<Folder Name="HelloStarcounter" TargetFolderName="HelloStarcounter">
<Folder Name="css" TargetFolderName="css" />
<Folder Name="js" TargetFolderName="js" />
<Folder Name="viewmodels" TargetFolderName="viewmodels">
<ProjectItem ReplaceParameters="true" TargetFileName="MainPage.html">MainPage.html</ProjectItem>
</Folder>
</Folder>
</Folder>
</Project>
</TemplateContent>
</VSTemplate>
16 changes: 16 additions & 0 deletions src/Starcounter.VS.CSBasicApplicationProjectTemplate/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using $safeprojectname$.Api;
using Starcounter;

namespace $safeprojectname$
{
internal class Program
{
private static void Main()
{
MainHandlers.Register();
CommitHooks.Register();
PartialHandlers.Register();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Starcounter.Internal;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("$safeprojectname$")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("$safeprojectname$")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("526edd06-b4f0-469f-a4d4-e95b3c94f5ac")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

// Assures the current assembly has a reference to the Starcounter
// assembly. A reference to Starcounter is currently required for
// Starcounter to detect that an assembly should be hosted.
[assembly: StarcounterAssembly()]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"Html": "/$safeprojectname$/viewmodels/MainPage.html",
"Visitors": [
{
"VisitorName": "",
"DateVisited": ""
}
],
"NewName$": "",
"AddVisitorTrigger$": 0
}
Loading