Trouble setting up RavenDB in embedded mode - ravendb

I used this as a reference and installed both (using nuget)
Install-Package RavenDB.Client -Version 1.0.992
AND
Install-Package RavenDB-Embedded -Version 1.0.919
(The official link recommends using Install-Package RavenDB-Embedded. But that nuget command fails with the error Install-Package : Unable to find package 'RavenDB-Embedded'.)
But the code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Raven.Client.Document;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
var Store = new DocumentStore { ConnectionStringName = "RavenDB" };
var instance = new EmbeddableDocumentStore { ConnectionStringName = "RavenDB" };
}
}
}
does not recognize EmbeddableDocumentStore. What is the namespace for EmbeddableDocumentStore?

After looking around in google groups and some experimenting, I got the solution
Use
Install-Package RavenDB.Embedded -Version 1.0.992
Also if its a console application: right click on the console project-->properties-->
Set Target framework to .NET Framework4 (as opposed to the default .NET Framework 4 Client Profile

Related

C++/WinRT console application using c++17 language projection

I was curious about how I can call .net libraries from a C++ console application using the newer C++/WinRT using C++17 language projections. But I find that it’s hard to find even a hello world example of this.
How would I create an equivalent console application in C++/WinRT as this simple C# hello world program:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DemoApplication
{
class Program
{
static void Main(string[] args)
{
Console.Write("Hello World");
Console.ReadKey();
}
}
}
I guess you need to use c++/cx instead of c++/WinRT, since c++/cx let’s you access .net and c++/WinRT only lets you access the UWP version of .net called runtime components:
#using <mscorlib.dll>
using namespace System;
int main(array<System::String ^> ^args)
{
System::Console::WriteLine("Hello world");
return 0;
}

Build error when using [FromService] decorators in controller with Functions v3

I have created a new projected, where I am trying to use [FromServices] with Microsoft.NET.Sdk.Functions" Version="3.0.13" and "Microsoft.Azure.Functions.Extensions" Version="1.1.0".
There are some tickets opened on this subject. For example this one.
I haven't seen any response/solution from Microsoft.
Is there an incompatibility between libs, what is the combination that I should use?
If this method injection doesn't work, can you please tell me what other alternatives do I have?
Startup.cs
using Azure.Storage.Blobs;
using Microsoft.Azure.Functions.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Logging;
[assembly: FunctionsStartup(typeof(Startup))]
namespace SubscriptionManager.Functions
{
public class Startup : FunctionsStartup
{
public override void Configure(IFunctionsHostBuilder builder)
{
builder.Services.AddTransient<IAccountService, AccountService>();
builder.Services.AddScoped<ISubscriptionService, SubscriptionService>();
}
}
}
Thank you!
The .Net version comaptible with "Microsoft.Azure.Functions.Extensions" Version="1.1.0" is .NETStandard 2.0.
Please refer the Document.

SignalR 2.0 The namespace '' already contains a definition for 'Startup'

I tried to follow a tutorial on SignalR 2.0. with ASP.NET MVC 4.0
I build the new Startup class as instructed.
using System;
using System.Threading.Tasks;
using Microsoft.Owin;
using Owin;
[assembly: OwinStartup(typeof(MyApp.Startup))]
namespace MyApp
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
// For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888
app.MapSignalR();
}
}
}
When I tried to build the project. I got The namespace 'MyApp' already contains a definition for 'Startup' .
I have search the whole project and physical folders to find where the second Startup,cs is but I could not find it.
Can anyone share some light on this?
Thanks,
I found the duplicate. It was defined in BundleConfig.cs. Removed it from BundleConfig.cs and it builds fine. Thanks,
Try making your Startup class partial:
public partial class Startup

Can't subscribe to CheckinEvent

I am trying to subscribe to CheckinEvent, for some reason my Notify method isn't called.
This is my contract -
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
namespace TFSubscriber
{
[ServiceContract(Namespace = "http://schemas.microsoft.com/TeamFoundation/2005/06/Services/Notification/03")]
public interface IRollupService
{
[OperationContract(Action = "http://schemas.microsoft.com/TeamFoundation/2005/06/Services/Notification/03/Notify")]
[XmlSerializerFormat(Style = OperationFormatStyle.Document)]
void Notify(string eventXml, string tfsIdentityXml);
}
}
My implementation is pretty simple, empty method. I put a breakpoint in my Notify method and it's not called.
This how I subscribe to CheckinEvent -
C:\Program Files\Microsoft Team Foundation Server2010\Tools>bissubscribe.exe /eventType CheckInEvent /address http://localhost:4556/Rollupservice.svc /collection http://localhost:8080/tfs/defaultcollection
I have a solution that I added to source control already, and I am checkin' some files and the breakpoint isn't getting hit.
What am I doing wrong?
Are you sure your subscription works? For example try logging some information regarding input parameter eventXML. Because, you need to be sure about if your subscription works or not. If so, you can run your SVC project and attach a debugger on it. That is how debugger supposed to hit your breakpoint.

BundleTransformer.Core throwing implementation exception

I'm trying to use BundleTransformer.Core and BundleTransformer.Less, however I've run into the following exception when trying to setup MVC4 bundles using the recommended code:
Method 'OrderFiles' in type 'BundleTransformer.Core.Orderers.NullOrderer' does not have an implementation.
That exception is thrown on registering the following:
public static void RegisterBundles(BundleCollection bundles)
{
var cssTransformer = new CssTransformer();
var jsTransformer = new JsTransformer();
var nullOrderer = new NullOrderer();
var commonStylesBundle = new Bundle("~/Bundles/CommonStyles");
commonStylesBundle.Include("~/Styles/V3/functions.less",
"~/Styles/V3/helpers.less",
"~/Styles/V3/media-queries.less",
"~/Styles/V3/normalize.less",
"~/Styles/V3/print.less",
"~/Styles/V3/style.less");
commonStylesBundle.Transforms.Add(cssTransformer);
commonStylesBundle.Orderer = nullOrderer;
bundles.Add(commonStylesBundle);
}
I have tried both the latest versions of BundleTransformer.Core and the immediate prior version.
It seems that you have installed preview version of the Microsoft ASP.NET Web Optimization Framework (1.1.0 Alpha1 or 1.1.0 Beta1). At the moment, the Bundle Transformer supports only RTM-version of the Microsoft ASP.NET Web Optimization Framework (version 1.0.0). I recommend that you roll back to RTM-version.