1

estoy haciendo un proyecto 2d con Unity y para guardar el progreso que hace en los diferentes niveles y para ello utilizo archivos xml,los archivos el pprograma me lo crea, pero el problema es que lo quiero encriptar y desencriptar, pero cuando pongo en using System.Security.Cryptography.Xml, Unity me da el siguiente error, Assets\xml.cs(6,36): error CS0234: The type or namespace name 'Xml' does not exist in the namespace 'System.Security.Cryptography' (are you missing an assembly reference?), para intentar solucionarlo he copiado la dll de Cryptography.Xml en la carpeta, he generado dos archivos que recomendaban en otra pregunta, un archivo era mcs.rsp con el siguiente contenido: -r:System.Security.dll; y el siguiente archivo, csc.rsp con el siguiente contenido:

# The .NET Foundation licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.

# This file contains command-line options that the C#
# command line compiler (CSC) will process as part
# of every compilation, unless the "/noconfig" option
# is specified. 

# Reference the common Framework libraries
/r:Accessibility.dll
/r:Microsoft.CSharp.dll
/r:System.Configuration.dll
/r:System.Configuration.Install.dll
/r:System.Core.dll
/r:System.Data.dll
/r:System.Data.DataSetExtensions.dll
/r:System.Data.Linq.dll
/r:System.Data.OracleClient.dll
/r:System.Deployment.dll
/r:System.Design.dll
/r:System.DirectoryServices.dll
/r:System.dll
/r:System.Drawing.Design.dll
/r:System.Drawing.dll
/r:System.EnterpriseServices.dll
/r:System.Management.dll
/r:System.Messaging.dll
/r:System.Runtime.Remoting.dll
/r:System.Runtime.Serialization.dll
/r:System.Runtime.Serialization.Formatters.Soap.dll
/r:System.Security.Cryptography.Xml
/r:System.Security.dll
/r:System.ServiceModel.dll
/r:System.ServiceModel.Web.dll
/r:System.ServiceProcess.dll
/r:System.Transactions.dll
/r:System.Web.dll
/r:System.Web.Extensions.Design.dll
/r:System.Web.Extensions.dll
/r:System.Web.Mobile.dll
/r:System.Web.RegularExpressions.dll
/r:System.Web.Services.dll
/r:System.Windows.Forms.dll
/r:System.Workflow.Activities.dll
/r:System.Workflow.ComponentModel.dll
/r:System.Workflow.Runtime.dll
/r:System.Xml.dll
/r:System.Xml.Linq.dll
/r:System.Net.Http.dll, 
pero cuando pongo los dos archivos adjuntos, me da el siguiente error: Microsoft (R) Visual C# Compiler version 3.5.0-dev-20359-01 (8da8ba0c)
Copyright (C) Microsoft Corporation. All rights reserved.

warning CS2023: Ignoring /noconfig option because it was specified in a response file
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\.NET' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\Foundation' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\licenses' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\this' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\file' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\to' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\you' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\under' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\the' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\MIT' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\license.' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\Licensed' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\See' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\LICENSE' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\contains' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\in' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\command-line' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\options' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\project' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\one' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\root' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\that' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\or' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\for' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\more' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\information.' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\agreements.' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\This' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\The' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\C#' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\line' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\command' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\as' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\compiler' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\common' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\part' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\Framework' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\(CSC)' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\of' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\libraries' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\will' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\every' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\compilation,' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\process' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\unless' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\option' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\is' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\specified.' could not be found.
error CS2001: Source file 'C:\Users\sepul\New Unity Project (3)\Reference' could not be found.``` 
Muchas gracias de antemano
Y tambien, el codigo que tengo para encriptar y desencriptar es el de la siguiente pagina, gracias
https://docs.microsoft.com/es-es/dotnet/api/system.security.cryptography.xml.encryptedxml.encrypt?view=net-5.0

3
  • Añadiste esa libreria a las referencias de tu proyecto? Explorador de soluciones/clic derecho sobre la carpeta refernces/add references
    – Japv
    el 11 abr. 2021 a las 2:00
  • stackoverflow.com/questions/43249281/… entra aqui
    – Japv
    el 11 abr. 2021 a las 2:02
  • Hola Buenas, si, le añadí la referencia al proyecto y el seguia dando error el 12 abr. 2021 a las 6:10

0

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Examina otras preguntas con la etiqueta o formula tu propia pregunta.