While developing Angular applications in Visual Studio 2019 & Visual Studio Code following compile time error is shown:

TS1219 Experimental support for decorators is a feature that is subject to change in a future release. Specify ‘–experimentalDecorators’ to remove this warning.

Visual Studio Fix:

I am using Visual Studio 2019 and fixed the issue in it, it might work in other versions as well.

Add the following lines in .csproj file:

  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">    

Tip: You can edit .csproj file by unloading the project, right click and select Edit .csproj file in solution explorer.

Here is the example .csproj file after adding the above options:

<Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>netcoreapp2.2</TargetFramework> <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked> <TypeScriptToolsVersion>Latest</TypeScriptToolsVersion> <IsPackable>false</IsPackable> <SpaRoot>ClientApp\</SpaRoot> <DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes> <!-- Set this to true if you enable server-side prerendering --> <BuildServerSideRenderer>false</BuildServerSideRenderer> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.AspNetCore.App" /> <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" /> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" /> </ItemGroup> <ItemGroup> <!-- Don't publish the SPA source files, but do show them in the project files list --> <Content Remove="$(SpaRoot)**" /> <None Remove="$(SpaRoot)**" /> <None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" /> </ItemGroup> <ItemGroup> <None Remove="ClientApp\src\app\privacy\privacy.component.ts" /> <None Remove="ClientApp\src\app\terms\terms.component.ts" /> </ItemGroup> <ItemGroup> <TypeScriptCompile Include="ClientApp\src\app\privacy\privacy.component.ts" /> <TypeScriptCompile Include="ClientApp\src\app\terms\terms.component.ts" /> </ItemGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> <TypeScriptExperimentalDecorators>True</TypeScriptExperimentalDecorators> <TypeScriptEmitDecoratorMetadata>True</TypeScriptEmitDecoratorMetadata> </PropertyGroup> <Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') "> <!-- Ensure Node.js is installed --> <Exec Command="node --version" ContinueOnError="true"> <Output TaskParameter="ExitCode" PropertyName="ErrorCode" /> </Exec> <Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." /> <Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." /> <Exec WorkingDirectory="$(SpaRoot)" Command="npm install" /> </Target> <Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish"> <!-- As part of publishing, ensure the JS resources are freshly built in production mode --> <Exec WorkingDirectory="$(SpaRoot)" Command="npm install" /> <Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod" /> <Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:ssr -- --prod" Condition=" '$(BuildServerSideRenderer)' == 'true' " /> <!-- Include the newly-built files in the publish output --> <ItemGroup> <DistFiles Include="$(SpaRoot)dist\**; $(SpaRoot)dist-server\**" /> <DistFiles Include="$(SpaRoot)node_modules\**" Condition="'$(BuildServerSideRenderer)' == 'true'" /> <ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)"> <RelativePath>%(DistFiles.Identity)</RelativePath> <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> </ResolvedFileToPublish> </ItemGroup> </Target> </Project> read more

In this article we will see the step by step process to move JIRA from on-premises or virtual machine to Microsoft Azure VM.

  1. Backup from the existing installation
  2. Provision Azure VM (if you don’t have already)
  3. Install JIRA on Azure VM but don’t run it
  4. Restore JIRA home folder
  5. Create new database
  6. Run JIRA
  7. Restore database

1. Backup from the existing installation

First take the database backup, login as administrator, go to System menu and click on Import & Export , enter File name, database will be export as xml back (normally it will be exported to C:\Program Files\Atlassian\Application Data\JIRA\export).

Now copy the JIRA home folder ( which is normally at this location C:\Program Files (x86)\Atlassian\Application Data\JIRA ) to Azure VM. read more

More and more companies are using cloud infrastructure to host their applications and databases. In this article we will discuss the high level steps to move on-premises SQL Server database to Azure SQL database using Microsoft SQL Server Management Studio:

  1. Download and install the latest version of Microsoft SQL Server Management Studio, old version can give unexpected errors as now Azure SQL databases have almost same set of features as on-premises databases can have.
  2. Right click on the database to deploy to Azure, click on Tasks and Deploy Database to Microsoft Azure SQL Database.
  3. Follow the wizard, enter deployment settings (you must have an Azure subscription), click next, verify the details and submit the migration process.


(adsbygoogle = window.adsbygoogle || []).push({});

There are some other ways as well to migrate the database to Azure but we found this very intuitive.

Hope it will help you in your next migration.

Comments read more

ASP.NET SignalR is a library for ASP.NET developers that simplifies the process of adding real-time web functionality to applications. Real-time web functionality is the ability to have server code push content to connected clients instantly as it becomes available, rather than having the server wait for a client to request new data – Microsoft

Normally server sends notifications to clients when communication is initiated by some client but there are situations when we want server to push data to clients even there is no request from any clients.
Here is step by step procedure to do so.

[the_ad id=”181″]

Step 1
Add hub class, right click (on the App_Code in case of website project or appropriate folder in case of web application project), select Add and then Add New Item. Select the SignalR Hub Class template, give it a name say BroadcasterHub and click Add.
Your class should look like below:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.AspNet.SignalR;
using Microsoft.AspNet.SignalR.Hubs;
public class BroadcasterHub : Hub
private readonly Broadcaster _broadcaster;
public BroadcasterHub() : this(Broadcaster.Instance) { }

public BroadcasterHub(Broadcaster broadcaster)
_broadcaster = broadcaster;
read more

You can create the user in Microsoft SQL Server & Microsoft Azure SQL Database using the following code.

  1. Connect to master database and execute the following script:

    CREATE LOGIN UserNameHere WITH password='Password here';
    CREATE USER UserNameHere FROM LOGIN UserNameHere;
  2. Then connect to the desired database and execute the following script:

    CREATE USER UserNameHere FROM LOGIN UserNameHere ;
    EXEC sp_addrolemember 'db_datareader', 'UserNameHere';

We have added newly created user to data reader role, you can add user to whatever roles you want.
#wpdevar_comment_6 span,#wpdevar_comment_6 iframe{width:100% !important;}

Sometime we need to do undo checkout from other user’s workspace in Team Foundation Server (TFS). Here is the procedure to do it using Visual Studio’s Command Prompt.
Open the Visual Studio Command Prompt and type the following command:

tf undo /workspace:"WorkspaceName;WorkspaceOwnerName" $/Project/SomeFile.aspx 

Replace the workspace and workspace owner’s name and also path of the file to undo checkout.

You must have “Undo other users’ changes” permission to perform this. When you will execute this command it might prompt for your TFS credentials (if those were not saved/remembered).

Tip: You can use the above command to undo checkout a file from your own workspace.

Tip: To get the workspace and owner names and file path, try to check out the same file in Visual Studio it will provide this information in output window, copy from there and replace in the above command and execute it.

Tip: You can undo check out all the files in project or specific directory by add /recursive parameter in the command, please see the example below:
Example 1

tf undo /workspace:"WorkspaceName;WorkspaceOwnerName" $/Project /recursive

Example 2

tf undo /workspace:"WorkspaceName;WorkspaceOwnerName" $/Project/SomeDirectory /recursive

Note: “WorkspaceName;WorkspaceOwnerName” is given it quotation marks, most of the documentation and tutorials don’t mention it but your command couldn’t be executed successfully if you don’t wrap it in quotation marks.

#wpdevar_comment_8 span,#wpdevar_comment_8 iframe{width:100% !important;}

Recently we were in a situation where we need to merge data from our offline version of application with online database.
We planned to use uniqueidentifier as data type for ID columns instead of int (auto identity).

But when we looked at reviews a lot of people were against this idea, they said if we use uniqueidentifier column as primary key (and clustered index) then there will be lot of fragmentation in our database, also the extra size of key.

Some people suggested that use the int type (auto identity) as primary key and add another column of uniqueidentifier type for this purpose. We decided to go with this idea and added a uniqueidentifier column in each table.

We don’t see any issue in this design right now and hopefully it will work for long term.

#wpdevar_comment_9 span,#wpdevar_comment_9 iframe{width:100% !important;}

Hosting providers unload your application after certain amount of time if the application is idle. Microsoft Azure provide Always ON option (with some extra cost) to keep the application always running. You can enable these settings from Azure Portal as show below:

However there is an issue if your application is running on HTTPS and you have rewrite rules to redirect HTTP traffic to HTTPS then Always ON settings in Azure will not work.

You can fix it in many ways, here is one of them. Add the following rewrite rule in your web.config, it should be first rule (if you have other rules in web.config):

        <rule name="Top Rules" enabled="true" stopProcessing="true">
          <!-- Please always keep this rule on the top of list -->
          <match url=".*" />
          <conditions logicalGrouping="MatchAny">
            <add input="{HTTP_USER_AGENT}" pattern="Initialization" ignoreCase="true"/>
            <add input="{HTTP_USER_AGENT}" pattern="AppInit" 		ignoreCase="true" />
            <add input="{HTTP_USER_AGENT}" pattern="WarmUp" 		ignoreCase="true"/>
            <add input="{HTTP_USER_AGENT}" pattern="AlwaysOn" 		ignoreCase="true"/>
          <action type="Rewrite" url="{URL}" />

#wpdevar_comment_10 span,#wpdevar_comment_10 iframe{width:100% !important;}