小编Dez*_*ood的帖子

为什么将我的目标框架从".NET Framework 4 Client Profile"更改为".NET framework 4"会给我发出警告消息?

这条线:

<startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
Run Code Online (Sandbox Code Playgroud)

已添加到我的App.config文件中,现在我收到警告消息:

找不到元素'supportedRuntime'的架构信息

找不到属性"version"的架构信息

找不到属性'sku'的架构信息

我可以从配置文件中删除该行吗?当我运行应用程序时,一切正常.

.net c# xsd app-config visual-studio

14
推荐指数
1
解决办法
6708
查看次数

尝试使用特殊字符FTP文件

我有代码:

FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create(url);
request.Method = WebRequestMethods.Ftp.DownloadFile;
request.UseBinary = true;   // Binary mode when downloading
request.Credentials = new NetworkCredential(user, password);
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
Run Code Online (Sandbox Code Playgroud)

我总是得到错误:"请求的URI对此FTP命令无效".

问题是网址包含"#".由于我不能阻止人们创建这种类型的文件,有没有办法可以转义特殊字符并仍然处理文件?

c# ftp

5
推荐指数
1
解决办法
4170
查看次数

试图让C#Dependency Injection示例工作

我从以下网址下载了这段代码:http://msdn.microsoft.com/en-us/magazine/cc164657.aspx但它的VS 2003.我试图让它在VS 2010中运行.似乎有一些变化.例如,我需要在2010年实例化一个资源对象.这是主要代码:

using System;
using System.IO;
using Spring.Objects.Factory.Xml;
using SpringDIExample;
namespace runner
{
class Class1
{

    [STAThread]
    static void Main()
    {
        // 1. Open the configuration file and create a new
        //    factory, reading in the object definitions
        using (Stream stream = File.OpenRead("config.xml"))
        {
            // 2. Create a new object factory
            Spring.Core.IO.InputStreamResource resource = new Spring.Core.IO.InputStreamResource(stream, "config");
            XmlObjectFactory xmlObjectFactory = new XmlObjectFactory(resource);

            // 3. Call my factory class with generic label for the …
Run Code Online (Sandbox Code Playgroud)

c# spring.net

0
推荐指数
1
解决办法
2641
查看次数

标签 统计

c# ×3

.net ×1

app-config ×1

ftp ×1

spring.net ×1

visual-studio ×1

xsd ×1