参考Visual Studio 2010? [英] References Visual Studio 2010?

查看:63
本文介绍了参考Visual Studio 2010?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在检查此代码,试图了解Velocity:
$


命名空间VelocityClientConsole

{

class program

{

static void Main(string [] args)

{

//创建缓存factory

CacheFactory factory = new CacheFactory();
$


//获取默认命名缓存

缓存缓存= factory.GetCache(" default");
$


//在缓存中添加一个字符串

cache.Put(" MyCacheKey" ;,"Hello World");
$


//从缓存中获取数据

string s =(string)cache.Get ("MyCacheKey");
$


Console.WriteLine(s);



Console.ReadLine( ); $
}

}

}

$
显示错误找不到CacheFactory,类型或名称名称'CacheFactory'。 (你错过了一个using指令吗?)。


$
我发现CacheFactory Class需要:

命名空间:System.Data.Caching

程序集:ClientLibrary(在clientlibrary.dll中)

添加它们仍然是错误加上System.Data.Caching上的错误。



任意想法?,请记住我是视觉工作室和速度的新手。



谢谢

I'm Checking this code trying to learn about Velocity:

namespace VelocityClientConsole
{
class Program
{
static void Main(string[] args)
{
// Create the cache factory
CacheFactory factory = new CacheFactory();

// Get the default named cache
Cache cache = factory.GetCache("default");

// Add a string to the cache
cache.Put("MyCacheKey", "Hello World");

// Get the data from the cache
string s = (string)cache.Get("MyCacheKey");

Console.WriteLine(s);

Console.ReadLine();
}
}
}

It shows an error on CacheFactory, the type or namesapce name 'CacheFactory' could not be found. (are you missing a using directive?).

I found that CacheFactory Class needs:
Namespace: System.Data.Caching
Assembly: ClientLibrary (in clientlibrary.dll)
Added them and still the error plus an error on System.Data.Caching.

Any ideas?, Please keep in mind I'm new to visual studio and velocity.

Thanks

推荐答案

您正在使用非常旧的app-fabric缓存CTP。它不再受支持。下载最新版本的app-fabric缓存并开始使用它。请查看以下链接以了解缓存。

You are using a very old CTP of app-fabric caching. It is no longer supported. Downlaod the latest version of app-fabric caching and start using it. Please check the following link to understand caching.

http:// msdn.microsoft.com/en-us/library/ff383731.aspx

下载最新版本 不会改变编译C#代码的任何内容,检查项目的目标框架。它不应该是'X.Xclient profile'。选择.net 3.5或4.0并开始使用 缓存。

Downloading latest version doesn't change anything about compiling C# code, check target framework for your project. It should not be 'X.Xclient profile'. Choose .net 3.5 or 4.0 and start playing with the cache.


这篇关于参考Visual Studio 2010?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆